Skip to content

Fix casing for camel-cased svg values#1108

Merged
devongovett merged 1 commit intoparcel-bundler:masterfrom
noahbald:fix/svg-parsing
Jan 4, 2026
Merged

Fix casing for camel-cased svg values#1108
devongovett merged 1 commit intoparcel-bundler:masterfrom
noahbald:fix/svg-parsing

Conversation

@noahbald
Copy link
Copy Markdown
Contributor

Closes #1106

Turns out these values weren't parsing because they didn't have the casing attribute applied


/// A value for the [color-interpolation](https://www.w3.org/TR/SVG2/painting.html#ColorInterpolation) property.
#[derive(Debug, Clone, Copy, PartialEq, Parse, ToCss)]
#[css(case = lower)]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: will this cause the value to output as e.g. "srgb" instead of "sRGB"? Afaik SVG values shouldn't be case-insensitive

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it will. CSS values are case insensitive, but I'm not sure about SVG presentation attributes. I saw some specs mention that sRGB was case insensitive but I didn't test that.

Copy link
Copy Markdown
Contributor Author

@noahbald noahbald Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example from MDN doesn't seem show any difference between casing

@devongovett devongovett merged commit e2a7d52 into parcel-bundler:master Jan 4, 2026
3 checks passed
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.

Add SVG 1.1 variants of presentation attribute values

2 participants