@@ -2472,16 +2472,12 @@ const slotSpellings = (slot) => {
24722472
24732473/**
24742474 * Each shorthand -> the keywords a value of it may drop, and for each the other
2475- * spellings its slot takes. A slot holding what it already defaults to says
2476- * nothing, but only under three conditions, and every one of them is a rewrite
2477- * that turned a declaration the engine drops into one it accepts:
2478- * the keyword must be named by exactly one slot (`animation`'s `none` is both a
2479- * name and a fill mode), every value that slot takes must be one the spellings
2480- * report (`mask: url(a.svg) none` fills one slot twice and is dropped, so
2481- * removing the `none` would revive it), and it must be a slot of its own rather
2482- * than one reached through a `/`. What a slot takes beyond its spellings is
2483- * carried as the value classes it names, since `#fff` is no spelling of `<color>`
2484- * and fills the slot as surely as a keyword.
2475+ * spellings its slot takes. A keyword is droppable only where naming one slot
2476+ * (`animation`'s `none` is a name and a fill mode), where the spellings report
2477+ * every value that slot takes (`mask: url(a.svg) none` fills one slot twice and
2478+ * is dropped), and where the slot is its own rather than reached through a `/`;
2479+ * what it takes beyond them rides along as value classes, since `#fff` is no
2480+ * spelling of `<color>`.
24852481 * @param {Set<string> } colorKeywords every keyword that is a color, which is the one class a keyword itself can be in
24862482 * @returns {[string, [string, string[], string[]][]][] } the entries, sorted by property
24872483 */
@@ -2501,9 +2497,8 @@ const collectShorthandInitialKeywords = (colorKeywords) => {
25012497 return {
25022498 named : new Set ( [ ...values . keywords ] . map ( ( one ) => one . toLowerCase ( ) ) ) ,
25032499 spellings : slotSpellings ( slot ) ,
2504- // What the slot takes beyond the spellings — a length, a color, an
2505- // image. `lib/css/syntax.js` reads a sibling's own classes against
2506- // these, and refuses the drop for a value it cannot class at all.
2500+ // What the slot takes beyond the spellings. `syntax.js` reads a
2501+ // sibling's classes against these, and refuses one it cannot class.
25072502 classes : [ ...values . classes ]
25082503 . filter ( ( one ) => ! isSpelledClass ( one ) )
25092504 . sort ( )
@@ -3186,12 +3181,8 @@ const collectLengthOnlyFunctions = () => {
31863181} ;
31873182
31883183/**
3189- * @returns {string[] } the functions that take a color argument directly, sorted
3190- */
3191- /**
3192- * The functions that are a color, out of `<color>`'s own grammar: the calls a
3193- * slot taking a color accepts, which is what says a value spelled as one fills
3194- * that slot. A gradient is an `<image>` and is not among them.
3184+ * The functions that are a color, out of `<color>`'s own grammar — so a value
3185+ * spelled as one fills a color slot. A gradient is an `<image>`, not one.
31953186 * @returns {string[] } the function names, sorted
31963187 */
31973188const collectColorFunctions = ( ) => {
@@ -3557,11 +3548,10 @@ const collectColorNames = (colorName) => {
35573548} ;
35583549
35593550/**
3560- * The named colors an engine may read none of while reading the rest: the ones
3561- * carrying a compatibility row of their own under `<named-color>`, which is
3562- * where a name that arrived after the list did is recorded. Every other name is
3563- * as old as naming a color at all, so one of them stands wherever another does —
3564- * which is what lets a later declaration of one supersede an earlier.
3551+ * The named colors an engine may read none of while reading the rest — the ones
3552+ * carrying a `<named-color>` compatibility row, where a name that arrived after
3553+ * the list did is recorded. Every other name is as old as naming a color at all,
3554+ * so one stands wherever another does.
35653555 * @returns {string[] } the names, sorted
35663556 */
35673557const collectLaterColorNames = ( ) => {
@@ -7122,9 +7112,8 @@ ${SUPPLEMENT.colorSpacePrimitives.map(([, source]) => source).join("\n\n")}
71227112
71237113${ colorSpaceModel . text }
71247114
7125- // The named colors an engine may not read while reading the rest, so one of them
7126- // says nothing about what another engine takes. Every other name arrived with
7127- // naming a color at all.
7115+ // The named colors an engine may not read while reading the rest, so one says
7116+ // nothing about what another takes. Every other name is as old as naming one.
71287117const LATER_COLOR_NAMES = ${ setLiteral ( laterColorNames ) } ;
71297118
71307119// Every named color as its packed \`0xrrggbb\` value — what a color a mix or a
0 commit comments