w3c / w3c/csswg-drafts

[css-values-4] Serialization of Functional Notations

Open
#9,720 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

css-values-4 Needs Testcase (WPT)
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the proposed generic definition for functional notations in CSS Values L4 and review the issue's discussion of specified versus computed value serialization. The non-controversial rules are listed, but completion requires resolving whether optional values should be omitted in specified value serialization and incorporating the agreed definition into the specification.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.