w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.5k stars 661 forks source link

[css-fonts] Should `font-style: oblique 0deg` serialize as `oblique 0deg` or `normal`? #10911

Open weinig opened 1 month ago

weinig commented 1 month ago

The WPT tests are a bit inconsistent on what they say, as are the implementations, but should font-style: oblique 0deg serialize as oblique 0deg or normal?

In https://wpt.fyi/results/css/css-fonts/variations/font-style-parsing.html, the test indicates font-style: oblique 0deg should serialize as is.

In https://wpt.fyi/results/css/css-fonts/animations/font-style-interpolation.html, the test indicates font-style: oblique 0deg should serialize as normal.

My guess is the animation test is wrong, as the spec, https://drafts.csswg.org/css-fonts-4/#font-style-prop, states that the computed value should be:

the keyword specified, plus angle in degrees if specified

and the animation type should be:

by computed value type;normal animates as oblique 0deg

Loirooriol commented 1 month ago

Not familiar with this, but they seem to have different behaviors, so I would expect different serializations