w3c / csswg-drafts

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

[css-values-4] Serialization of Functional Notations #9720

Open fantasai opened 7 months ago

fantasai commented 7 months ago

Tab and I noticed that we don't rigorously define the serialization of functional notations, so we're proposing to add a generic definition to CSS Values L4.

The non-controversial aspects are:

The one area where we have very little agreement is

Generally-speaking, we omit optional components in computed values. This is an important principle of CSSOM serialization for computed values. But we are very inconsistent for specified values--this is extra confused by the fact that multiple "serialization" sections in our specs don't distinguish between specified and computed values and just assume there's only one serialization.

fantasai commented 7 months ago

Specified vs computed is defined here, fwiw: https://www.w3.org/TR/css-cascade-5/#value-stages

svgeesus commented 7 months ago

Nice, I'm comparing with the serialization stuff in Color 4 and 5 and Fonts 4 to pick up any differences.