Skip to content

Conversation

tidoust
Copy link
Member

@tidoust tidoust commented Jul 25, 2025

This is meant to address #1647. Given that this produces a breaking change in individual CSS extracts (a couple of entries without href), I propose not to merge this until we switch to consolidated CSS releases in Webref.

When a function or type was found in a production rule that does not have a <dfn>, it was added to the list of "missing definitions". This update forces the creation of a function/type. This is breaking change because, up until now, we guaranteed that all entries would have an href and that will no longer be the case.

In practice, the only cases where that happens are:

  1. When a spec extends a construct defined elsewhere, see Extended CSS value definitions #1647. In such cases, we'd want the extended type definition to appear in the extract.
  2. For <boolean-expr-group>, see Extraction of the CSS <boolean-expr[]> type #1878. In such cases, we'd rather not add the type since the underlying spec needs fixing.

Ideally, we'd restrict the logic to 1., but production rules are processed as raw text, meaning we don't have the link information that would tell us that we're looking at an extension. That is not such a big deal though: it is easy to tell when an entry without an href extends another, and it seems fine to use patching to curate the data for 2. (only one occurrence today).

CSS consolidation is updated to deal with extended functions and types. As opposed to extensions of properties where new values are added to the syntax, function/type extensions re-define the entire syntax.

When a function or type was found in a production rule that does not have a
`<dfn>`, it was added to the list of "missing definitions". In practice, the
only cases where that happens are:
- When a spec extends a construct defined elsewhere, see #1647. In such cases,
we'd want the extended type definition to appear in the extract.
- For `<boolean-expr-group>`, see #1878. In such cases, we'd rather not add
the type since the underlying spec needs fixing, but that can be caught
automatically, see below.

This code forces the creation of a function/type. This is breaking change
because, up until now, we guaranteed that all entries would have an `href` and
that will no longer be the case.

Ideally, we'd restrict this logic to extensions, but production rules are
processed as raw text, meaning we don't have the link information that would
tell us that we're looking at an extension. That is not such a big deal though:
it is easy to tell when an entry without an `href` extends another, and it
seems fine to use patching to curate the data (only one occurrence today).

CSS consolidation is updated to deal with extended functions and types. As
opposed to extensions of properties where new values are added to the syntax,
function/type extensions re-define the entire syntax.
@tidoust tidoust requested a review from dontcallmedom July 25, 2025 08:47
Merge operation duplicated a few lines of code...
@dontcallmedom dontcallmedom marked this pull request as draft July 25, 2025 14:12
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