Skip to content

Commit 3b58d7f

Browse files
authored
[css-mixins-1] Fix space placement in serialize a CSSFunctionRule (#13605)
* [css-mixins-1] Fix numbering of `serialize a CSSFunctionRule` * [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.
1 parent 100146f commit 3b58d7f

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

css-mixins-1/Overview.bs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2353,33 +2353,32 @@ return the concatenation of the following:
23532353
2. The result of performing <a>serialize an identifier</a>
23542354
on the name of the [=custom function=],
23552355
followed by a single LEFT PARENTHESIS (U+0028).
2356-
4. The result of [=serialize a function parameter=]
2356+
3. The result of [=serialize a function parameter=]
23572357
on each of the [=custom function's=] [=function parameter|parameters=],
23582358
all joined by <code>", "</code>
23592359
(COMMA U+002C, followed by a single SPACE U+0020).
2360-
5. A single RIGHT PARENTHESIS (U+0029).
2361-
6. If the [=custom function=] has [=custom function/return type=],
2360+
4. A single RIGHT PARENTHESIS (U+0029).
2361+
5. If the [=custom function=] has [=custom function/return type=],
23622362
and that [=custom function/return type=]
23632363
is not the [=universal syntax definition=] ("*"):
23642364
* A single SPACE (U+0020),
23652365
followed by the string <code>"returns"</code>,
23662366
followed by a single SPACE (U+0020).
23672367
* The result of performing [=serialize a CSS type=]
2368-
on that [=custom function/return type|type=],
2369-
followed by a single SPACE (U+0020).
2368+
on that [=custom function/return type|type=].
23702369

2371-
7. A single LEFT CURLY BRACKET (U+007B),
2372-
followed by a SPACE (U+0020).
2370+
6. A single SPACE (U+0020),
2371+
followed by a LEFT CURLY BRACKET (U+007B).
23732372

2374-
8. The result of performing [=serialize a CSS rule=]
2373+
7. The result of performing [=serialize a CSS rule=]
23752374
on each rule in cssRules,
23762375
filtering out empty strings,
2377-
all joined by a single SPACE (U+0020).
2376+
each preceded by a single SPACE (U+0020).
23782377

23792378
Note: [=Serialize a CSS rule=] can return an empty string
23802379
when serializing an empty {{CSSFunctionDeclarations}} rule.
23812380

2382-
9. A single SPACE (U+0020),
2381+
8. A single SPACE (U+0020),
23832382
followed by a single RIGHT CURLY BRACKET (U+007D).
23842383
</div>
23852384

0 commit comments

Comments
 (0)