Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CSS] Add highlighting for @scope at-rule #3867

Open
thecodechef opened this issue Nov 12, 2023 · 5 comments · May be fixed by #3869
Open

[CSS] Add highlighting for @scope at-rule #3867

thecodechef opened this issue Nov 12, 2023 · 5 comments · May be fixed by #3869
Labels
C: Syntax T: feature major update for a syntax to support new language features

Comments

@thecodechef
Copy link

What happened?

The current CSS.sublime-syntax breaks @scope at-rule highlighting

@scope (.light-scheme) {
  a {
    color: red;
  }
}

Screenshot 2023-11-12 at 4 29 08 PM

my current color-scheme & theme are Bass Blackcomb & Treble Adaptive respectively

@thecodechef

This comment was marked as spam.

@michaelblyons

This comment was marked as outdated.

deathaxe added a commit to deathaxe/sublime-packages that referenced this issue Nov 14, 2023
@thecodechef

This comment was marked as outdated.

@deathaxe deathaxe linked a pull request Nov 17, 2023 that will close this issue
@deathaxe deathaxe added T: feature major update for a syntax to support new language features C: Syntax labels Nov 17, 2023
@gnat
Copy link

gnat commented Nov 26, 2024

Could the maintainers of the CSS syntax just stop highlighting at rules (ex: @media, @scope) after the first whitespace ( ) is encountered?

The current behavior of continuing to highlight feels broken- and it'll continue to break as new at rules are added to CSS.

Note: VSCode correctly stops highlighting after the first whitespace- they never have to worry about adding new "at rules".

@deathaxe
Copy link
Collaborator

This question is off-topic, but the answer is no, because e.g. @media is followed by media queries which require special rules of parsing. And so do most at-rules. We often also apply special rules to scope identifiers which drive "Goto Definition" or Symbol List.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Syntax T: feature major update for a syntax to support new language features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants