ankit / stylebot

Change the appearance of the web instantly
https://stylebot.dev/
MIT License
1.39k stars 206 forks source link

[Feature] Nesting syntax support for native CSS #782

Open generrosity opened 1 month ago

generrosity commented 1 month ago

Is your feature request related to a problem? Please describe.

Nesting was proposed by W3C in 2019, and browser adoption has been growing. Its not a "problem" as such, just new syntax.

I would reference CanIUse here sorry but it seems to be down. This Aug 2023 article Native CSS nesting now supported by all major browsers has relevant screenshots. I've seen "70% worldwide browser support" start of this year.

 

Describe the solution you'd like

Syntax support for vanilla CSS nesting.

Specifically, this includes

image

Additional context

w3 syntax reference w3 Nesting other At-Rules MS referencing, including compound selectors MS concatenation counter-example MS invalid nested rule example MS nesting @AT rules, separate page of examples

Interesting examples for when the ampersand is required, edge cases and previously browser unsupported cases, and delights like ".card{ * {} }" (css-nesting)[https://ishadeed.com/article/css-nesting/]

Last notes

Thank you as always for sharing this tool. 💚

This year diagnosed with ADHD, but using this for years, and loving that I can share visibility and usability hacks with friends and collegues.