Replace the pinned CSS grammar with CSS3 without duplicate extensions - #3982
Open
Matei02355 wants to merge 2 commits into
Open
Replace the pinned CSS grammar with CSS3 without duplicate extensions#3982Matei02355 wants to merge 2 commits into
Matei02355 wants to merge 2 commits into
Conversation
Matei02355
marked this pull request as ready for review
September 7, 2026 15:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The older CSS grammar misses newer properties and functions. Adding CSS3 alongside it creates duplicate
.cssextensions and leaves embedded CSS ambiguous, as encountered in the earlier attempt.Pin ryboe/CSS3 at 074cb07145467a273edab4e3659f6a4091fa193c outside the syntax directory. The asset build temporarily substitutes it for the old grammar, retains the public name CSS, and restores the original on success or failure. Its MIT license remains in the acknowledgements. The package has over 500,000 Package Control installs.
A compatibility patch makes its rule-list-body entry point parse declarations directly. This preserves HTML, Svelte, and Vue style attributes without the upstream placeholder's disabled property parsing. Refresh the affected CSS, Vue, and Svelte fixtures and add modern CSS and HTML embedding regressions.
Fixes #3047.
Validation: verified a reconstruction of all 220 builtin grammar context records against the original, then replaced CSS and relinked every embedded context without missing references. No additional duplicate extensions, including hidden syntaxes. Compared 21 source fixtures: five added/changed, the remaining 16 unchanged; every rendered result preserved source text. Explicit color assertions cover properties, color-mix, inline styles, and recovery after an unfinished value. Successful and deliberately failed asset-build checks restored the original grammar and other patches. Patch application, Bash syntax and whitespace checks passed. No Rust application code changed.