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] Support CSS Nesting #3688
Comments
Once nesting becomes a stable enough feature, support might be added. A draft filed at just now, is not intended to be supported. |
Note that this will be enabled by default in browsers shipping next week. Chrome 112: 2023-04-04 |
Doesn't change its draft state. |
FWIW, nested CSS files are supported by Tailwind CSS It extends ST's default CSS adding tailwind related at-rules and nesting. |
Resolves sublimehq#3688 This commit implements support for nested selectors and rule lists according to current draft specification at https://drafts.csswg.org/css-nesting-1.
* [CSS] Add nested rules support Resolves #3688 This commit implements support for nested selectors and rule lists according to current draft specification at https://drafts.csswg.org/css-nesting-1. * [CSS] Reduce unused patterns from property lists This commit removes obsolete includes from `property-list-body` context. - `property-values` is no longer matched as `:` pushes `nested-selectors` - `illegal-blocks` is replaced by nested `property-lists` * [CSS] Fix template interpolation in CSS property names By excluding `prototype` from rule-lists this commit ensures, template tags are correctly scoped as part of a selector, property-name or property-value. That's important as `:` no longer denotes beginning of property-values, but is the beginning of nested selectors. Some extra `;` are added in syntax tests to make sure the following content is scoped correctly. That's required as assertion comments are sometimes scoped as selectors, caused by comment styles not being supported within CSS.
The modification of Not yet in Sublime as of build 4154 |
Or you could apply the PR that closed this issue for more rigor. #3785 |
Thanks but I'll pass. OP's is 1 line and works. The official change should hurry up into core. |
What happened?
Both Chrome 112 and Safari Technical Preview 162 now implement CSS Nesting.
More information is available here:
https://developer.chrome.com/articles/css-nesting/
https://webkit.org/blog/13813/try-css-nesting-today-in-safari-technology-preview/
Sublime doesn't yet highlight nested selectors. In the following example,
color
lacks thesupport.type.property-name.css
scope:I worked around this in my local
CSS.sublime-syntax
file by appending the following torule-list-body
:The text was updated successfully, but these errors were encountered: