Skip to content

fix(removeEmptyContainers): skip if filter is applied via styles as well#2089

Merged
SethFalco merged 3 commits intosvg:mainfrom
SethFalco:fix-remove-empty-containers
Dec 22, 2024
Merged

fix(removeEmptyContainers): skip if filter is applied via styles as well#2089
SethFalco merged 3 commits intosvg:mainfrom
SethFalco:fix-remove-empty-containers

Conversation

@SethFalco
Copy link
Member

Fixes a bug where we were too eager to remove empty containers.

We already had logic to skip removing empty containers if it had the filter attribute, which is needed to apply a filter to the whole area. However, the filter can also be defined through CSS. We did not properly handle this case, and treated the node as if it had no filter at all.

This computes the styles and checks the stylesheet as well. (We also move the logic down to avoid computing the styles eagerly.)

@SethFalco SethFalco merged commit f3495ff into svg:main Dec 22, 2024
@SethFalco SethFalco deleted the fix-remove-empty-containers branch December 22, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant