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

scour prefers attributes over style on input, which is backwards #2

Open
marnanel opened this issue Nov 22, 2024 · 0 comments
Open

Comments

@marnanel
Copy link

Consider this SVG of a peach-coloured rectangle (on the right, the rendered version):

bug bug, rendered

When passed through scour 0.38.2, it gains an orange border:

bug, scoured bug, scoured, rendered

This happens because the rect is defined as:

<rect
     fill="#ffc88f"
     stroke="#ff8900"
     stroke-width="0.79375"
     style="font-variation-settings:normal;mix-blend-mode:normal;stroke:none;paint-order:normal;stroke-opacity:1" />

(ignoring irrelevant attributes). The stroke:none in the CSS overrides the stroke="#ff8900" in the SVG. But scour honours the SVG setting over the CSS setting.

(yes, this did come up in my own workflow!)

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

No branches or pull requests

1 participant