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

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

Open
fantasai opened this issue Dec 18, 2023 · 2 comments
Open

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

fantasai opened this issue Dec 18, 2023 · 2 comments
Labels
css-values-4 Current Work

Comments

@fantasai
Copy link
Collaborator

fantasai commented Dec 18, 2023

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:

  • Serialize the arguments per their individual grammars.
  • Commas serialize with a following space.
  • Space-separate adjacent tokens (except between a value and a following comma or closing parenthesis)

The one area where we have very little agreement is

  • Whether to omit optional values in specified value serialization.

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 fantasai added the css-values-4 Current Work label Dec 18, 2023
@fantasai
Copy link
Collaborator Author

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

@svgeesus
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-values-4 Current Work
Projects
None yet
Development

No branches or pull requests

2 participants