Skip to content

Document the consolidated CSS file#1880

Merged
tidoust merged 3 commits intomainfrom
css-keys
Mar 24, 2026
Merged

Document the consolidated CSS file#1880
tidoust merged 3 commits intomainfrom
css-keys

Conversation

@tidoust
Copy link
Member

@tidoust tidoust commented Mar 24, 2026

This is a re-write of the @webref/css package README to document the JSON structure more thoroughly. All keys are now described with references to a definition in CSS specs when possible, considerations about their meaning and what to expect from key values, along with examples.

The README also includes example logic to gather information about specs from their URLs using browser-specs, as discussed in:
#1519 (comment)

There are a couple of cases where it may be valuable to clean up the data (that would introduce breaking changes though):

  • The extended key is always set, but then it's only meaningful for properties. It might become useful for other types of CSS features in the future, but could be dropped in the meantime not to create false expectations.
  • Descriptors have a for key that targets their parent at-rule. That sort of goes without saying. I haven't documented the key, especially since the for key is an array in all other cases.

There may also be a couple of cases where we could strengthen guarantees without necessarily creating more work for us, e.g., to clean up initial and animationType values. To be addressed separately!

Via #1874.

This is a re-write of the `@webref/css` package README to document the JSON
structure more thoroughly. All keys are now described with references to a
definition in CSS specs when possible, considerations about their meaning and
what to expect from key values, along with examples.

The README also includes example logic to gather information about specs from
their URLs using browser-specs, as discussed in:
#1519 (comment)

There are a couple of cases where it may be valuable to clean up the data
(that would introduce breaking changes though):
- The `extended` key is always set, but then it's only meaningful for
properties. It might become useful for other types of CSS features in the
future, but could be dropped in the meantime not to create false expectations.
- Descriptors have a `for` key that targets their parent at-rule. That sort of
goes without saying. I haven't documented the key, especially since the `for`
key is an array in all other cases.

There may also be a couple of cases where we could strengthen guarantees
without necessarily creating more work for us, e.g., to clean up `initial` and
`animationType` values. To be addressed separately!

Via #1874.
@tidoust tidoust requested a review from dontcallmedom March 24, 2026 08:57
Copy link
Member

@dontcallmedom dontcallmedom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great addition, thanks! LGTM with a few nits/suggestions

tidoust and others added 2 commits March 24, 2026 12:26
Co-authored-by: Dominique Hazael-Massieux <dom@w3.org>
Co-authored-by: Dominique Hazael-Massieux <dom@w3.org>
@tidoust tidoust merged commit 37fa079 into main Mar 24, 2026
1 check passed
@tidoust tidoust deleted the css-keys branch March 24, 2026 12:58
@tidoust tidoust mentioned this pull request Mar 25, 2026
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants