-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Check for filter in style as well as attribute. #1952
Conversation
Why do this instead of getComputedStyle? |
Are you talking about |
I'd recommend using |
I changed to computeStyle(). Regression results were identical. I created issue #1953 to begin discussions on the more general issue that style handling is inconsistent, inefficient, and incorrect. |
Co-authored-by: Seth Falco <seth@falco.fun>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a minor comment, but looks good overall!
Edit: Strange… GitHub isn't showing the comment… I'll write it again, I guess. ^-^'
Co-authored-by: Seth Falco <seth@falco.fun>
collapseGroups was not detecting a filter when it was in a style rather than an attribute.
This change resolves one regression mismatch (svgs/oxygen-icons-5.113.0/scalable/mimetypes/small/64x64/image-x-adobe-dng.svg) and reduces pixel mismatches by 67.
This type of problem seems like it is probably widespread (including in the same conditional in this plugin, where it is looking for a clip-path). I didn't see any tools to query the style attribute in a standard way. The solution in this PR is not going to scale well - it seems like it would be desirable to have a standardized, efficient way to query/change the style attribute - maybe it's there and I'm missing it?