Skip to content

Match browser CSSStyleRule serialization - #433

Merged
wieslawsoltes merged 1 commit into
mainfrom
fix/cssom-browser-serialization-432
Sep 18, 2026
Merged

wieslawsoltes merged 1 commit into
mainfrom
fix/cssom-browser-serialization-432

Conversation

@wieslawsoltes

Copy link
Copy Markdown
Collaborator

Both Linux and macOS main CI stopped in the runtime compatibility pre-build after #427 because the new live style-rule serializer removed browser-required brace spacing and a final declaration semicolon. Chrome 153 serializes the reproduced quoted-brace/escaped-string/data-URL rule with one space inside each brace and a final semicolon.

This change canonicalizes the live CSSStyleRule.cssText wrapper accordingly for empty, flat, and nested rules and updates the existing token-boundary regression to the Chrome oracle. The same serialized text is published to native stylesheet state, so replacement and later declaration mutations retain one browser-shaped representation.

Closes #432
Parent: #239

Validation:

  • Chrome 153 headless oracle: flat, empty, nested-media, and custom-property examples
  • Node 24.18.1 focused stylesheet CSSOM: 8/8
  • Node 24.18.1 full runtime compatibility: 26/26
  • 300 insert/delete mutation gate: 15.14 ms focused run
  • hosted Linux/macOS and portable/native gates pending
    \n

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.

Match browser CSSStyleRule.cssText serialization after nested-rule mutation

1 participant