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 support for at-scope rule #3869

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

deathaxe
Copy link
Collaborator

Resolves #3867

This commit implements support for @scope rules.

see: https://developer.mozilla.org/en-US/docs/Web/CSS/@scope

Notes: At the time of writing it is an experimental feature not supported by all major browsers.

@thecodechef
Copy link

This is Screenshot of your syntax tests when i see it from my end
Screenshot 2023-11-17 at 11 16 00 AM

the .limit > * part is highlighted but the .class is not thats what i mean by that

@deathaxe
Copy link
Collaborator Author

How is Github's syntax not supporting this new experimental feature related with the fix for ST's syntax definition?

grafik

@thecodechef
Copy link

Because when I also use it in the latest stable build I get the same behavior

@deathaxe
Copy link
Collaborator Author

CSS has significanty changed since ST4152. Hence, you'd need to replace the whole CSS.sublime-syntax file. It may however have effects on 3rd-party syntaxes such as Less as those may need some tweaks to follow these changes.

@thecodechef
Copy link

Which is what I did I extracted Packages/CSS using PackageResourcwViewer then copied your version and replaced the other

@deathaxe
Copy link
Collaborator Author

As all CI tests (against ST4143 and ST4165) are passing it must be an issue on your end.

@thecodechef
Copy link

That may be true, but tests can always send false positives. I have been using Sublime Text ever since Sublime Text 2 I'm not new. & furthermore it was when I changed your code thats it started working like it should

@deathaxe
Copy link
Collaborator Author

deathaxe commented Nov 17, 2023

As test results are equal with what I see, when symlinking this branch into a vanilla ST4152 portable setup's Packages folder, I tend to trust them.

The only "inaccuracy" this branch has, is allowing arbritary ammounts of () to () to () ..., which however shouldn't hurt in real world.

@thecodechef
Copy link

thecodechef commented Nov 17, 2023

push:
  - include: at-scope-content-keywords
  - include: at-scope-selector

Is what I meant in that comment

@deathaxe
Copy link
Collaborator Author

Note: @scope is supported by all major browsers and no longer marked experimental.

@nilaallj
Copy link

Any update on this?

@deathaxe
Copy link
Collaborator Author

This PR is waiting a 2nd approval by a maintainer to enable merging.

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.

[CSS] Add highlighting for @scope at-rule
4 participants