Skip to content

🐛 fix(cssom): guard escaped separators - #1647

Merged
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:fix/cssom-reread-20261106
Nov 6, 2026
Merged

gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:fix/cssom-reread-20261106

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

A CSS value ending in an unpaired backslash consumed the semicolon inserted by StyleDeclaration.text. Re-reading the text merged the next declaration into the value and changed the winning property.

The serializer now inserts a newline before that separator. The parser trims the newline from the value and keeps both declarations. Regression cases cover one, two, and three trailing backslashes, plus !important.

A value ending in an unpaired backslash consumed the semicolon added by
StyleDeclaration.text, merging the next declaration on re-read.

Insert a newline before that separator so the parser keeps the value and
the following declaration.
@gaborbernat gaborbernat added the bug Something isn't working label Nov 6, 2026
@codspeed

codspeed Bot commented Nov 6, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 582 untouched benchmarks
⏩ 32 skipped benchmarks1


Comparing gaborbernat:fix/cssom-reread-20261106 (f1d6d95) with main (be9cadb)

Open in CodSpeed

Footnotes

  1. 32 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@gaborbernat
gaborbernat merged commit 3099521 into tox-dev:main Nov 6, 2026
65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant