Skip to content

[css-mixins-1] Fix space placement in serialize a CSSFunctionRule#13605

Merged
tabatkins merged 2 commits intow3c:mainfrom
Calme1709:css-function-rule-spaces
Mar 24, 2026
Merged

[css-mixins-1] Fix space placement in serialize a CSSFunctionRule#13605
tabatkins merged 2 commits intow3c:mainfrom
Calme1709:css-function-rule-spaces

Conversation

@Calme1709
Copy link
Contributor

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.

Both of these changes are expected in WPT

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.
@tabatkins tabatkins merged commit 3b58d7f into w3c:main Mar 24, 2026
1 check failed
@Calme1709 Calme1709 deleted the css-function-rule-spaces branch March 24, 2026 23:35
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