Skip to content

Add @layer syntax highlighting#52

Open
Poliklot wants to merge 1 commit into
microsoft:mainfrom
Poliklot:feature/css-layer-syntax-highlighting
Open

Add @layer syntax highlighting#52
Poliklot wants to merge 1 commit into
microsoft:mainfrom
Poliklot:feature/css-layer-syntax-highlighting

Conversation

@Poliklot

@Poliklot Poliklot commented May 22, 2026

Copy link
Copy Markdown

Fixes #17
Fixes #24
Part of #20
Related to #7

This adds TextMate grammar support for CSS cascade layers.

Covered syntax:

  • @layer reset, framework.theme;
  • @layer framework { ... }
  • anonymous layers: @layer { ... }
  • nested layers: @layer foo { @layer bar { ... } }
  • @import "theme.css" layer;
  • @import url("theme.css") layer(framework.theme);

This intentionally keeps the scope limited to cascade layer syntax. Broader latest @import syntax support from #20 can be handled separately.

Testing

npm test

Result:

# tests 208
# pass 202
# fail 0
# skipped 6

Screenshots

Before:
image

After:
image

@Poliklot

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@Poliklot

Copy link
Copy Markdown
Author

@aeschli @dmitrivMS hi! Could you please take a look at PR #52 when you have a chance? It adds CSS TextMate grammar support for @layer, fixes #17 and #24, partially relates to #20, covers @layer, anonymous/nested layers, and @import ... layer(...), and includes tests. The PR has been open since May 22, 2026 and has not received a review yet. I’d really appreciate any feedback or guidance on what needs to be adjusted to move it toward merge.

@Poliklot

Copy link
Copy Markdown
Author

@lszomoru sorry for the extra ping — would you be able to help route this PR to the right reviewers? It touches only grammars/css.cson and spec/css-spec.mjs, includes tests, and the current blocker seems to be the VS Code Engineering “Community PR Approvals” check requiring 2 collaborator approvals. If you’re not the right person for CSS TextMate grammar changes, could you please point me to who is?

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.

Should layer be syntax highlighted? Add support for @layer

1 participant