Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Dec 22, 2024

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
12 checks passed
@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