-
Notifications
You must be signed in to change notification settings - Fork 765
Description
Apologies if this is in the spec somewhere and I just couldn't find it (though perhaps that's a sign it could be made clearer).
According to tested behaviour in WPT, (eg, here) this causes font to not be serializable:
.target {
font: "something";
font-variation-settings: "aaaa" a;
}font-variation-settings is a reset-only subproperty of font: Using the font shorthand always sets it to its initial value. My (wrong) mental model was that reset-only subproperties would not affect the shorthand's value. The reset-only subproperty definition and "serialize a CSS value" algorithm don't address this.
I think in particular, step 1.1 of "serialize a CSS value" is ambiguous (emphasis mine):
Let shorthand be the first shorthand property, in preferred order, that exactly maps to all of the longhand properties in list.
I would not expect a reset-only subproperty to be included in the list of longhand properties, but it seems like it actually should do?
In any case I think this could be clearer. Maybe even just specifying that reset-only subproperties are still considered longhands of the shorthand, so the usual rules apply. As someone coming across these, it's been counter-intuitive, even though I can understand now why it would behave like this.
Tangentially related to #878.