From 6fe5fae8a8194a24bd98ed5484c445768add696c Mon Sep 17 00:00:00 2001 From: Callum Law Date: Fri, 6 Mar 2026 00:29:08 +1300 Subject: [PATCH 1/2] [css-mixins-1] Fix numbering of `serialize a CSSFunctionRule` --- css-mixins-1/Overview.bs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/css-mixins-1/Overview.bs b/css-mixins-1/Overview.bs index 5f03832ce5f3..c8a0b8810cb7 100644 --- a/css-mixins-1/Overview.bs +++ b/css-mixins-1/Overview.bs @@ -2344,12 +2344,12 @@ return the concatenation of the following: 2. The result of performing serialize an identifier on the name of the [=custom function=], followed by a single LEFT PARENTHESIS (U+0028). - 4. The result of [=serialize a function parameter=] + 3. The result of [=serialize a function parameter=] on each of the [=custom function's=] [=function parameter|parameters=], all joined by ", " (COMMA U+002C, followed by a single SPACE U+0020). - 5. A single RIGHT PARENTHESIS (U+0029). - 6. If the [=custom function=] has [=custom function/return type=], + 4. A single RIGHT PARENTHESIS (U+0029). + 5. If the [=custom function=] has [=custom function/return type=], and that [=custom function/return type=] is not the [=universal syntax definition=] ("*"): * A single SPACE (U+0020), @@ -2359,10 +2359,10 @@ return the concatenation of the following: on that [=custom function/return type|type=], followed by a single SPACE (U+0020). - 7. A single LEFT CURLY BRACKET (U+007B), + 6. A single LEFT CURLY BRACKET (U+007B), followed by a SPACE (U+0020). - 8. The result of performing [=serialize a CSS rule=] + 7. The result of performing [=serialize a CSS rule=] on each rule in cssRules, filtering out empty strings, all joined by a single SPACE (U+0020). @@ -2370,7 +2370,7 @@ return the concatenation of the following: Note: [=Serialize a CSS rule=] can return an empty string when serializing an empty {{CSSFunctionDeclarations}} rule. - 9. A single SPACE (U+0020), + 8. A single SPACE (U+0020), followed by a single RIGHT CURLY BRACKET (U+007D). From 0cd8a5c7d7a3a56ddd12798dd70e4473da12a405 Mon Sep 17 00:00:00 2001 From: Callum Law Date: Fri, 6 Mar 2026 00:31:18 +1300 Subject: [PATCH 2/2] [css-mixins-1] Fix space placement in `serialize a CSSFunctionRule` By moving the space from step 5 to the start of step 6 we ensure that there is a space before the '{' regardless of whether we serialize the return type (i.e. "--foo() {..." rather than "--foo(){...") By moving the space from after the '{' in step 6 to before the first serialized rule in step 7 we ensure that there is only one space (the one in step 8) between the '{' and '}' in the case that there are no rules. --- css-mixins-1/Overview.bs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/css-mixins-1/Overview.bs b/css-mixins-1/Overview.bs index c8a0b8810cb7..f5cb16f7c895 100644 --- a/css-mixins-1/Overview.bs +++ b/css-mixins-1/Overview.bs @@ -2356,16 +2356,15 @@ return the concatenation of the following: followed by the string "returns", followed by a single SPACE (U+0020). * The result of performing [=serialize a CSS type=] - on that [=custom function/return type|type=], - followed by a single SPACE (U+0020). + on that [=custom function/return type|type=]. - 6. A single LEFT CURLY BRACKET (U+007B), - followed by a SPACE (U+0020). + 6. A single SPACE (U+0020), + followed by a LEFT CURLY BRACKET (U+007B). 7. The result of performing [=serialize a CSS rule=] on each rule in cssRules, filtering out empty strings, - all joined by a single SPACE (U+0020). + each preceded by a single SPACE (U+0020). Note: [=Serialize a CSS rule=] can return an empty string when serializing an empty {{CSSFunctionDeclarations}} rule.