Re: [csswg-drafts] Proposal: CSS Variable Groups (as a solution to several design systems pain points) (#9992)

I would *strongly* prefer not using an `@rule` here, for a number of reasons: 
- It’s superfluous: syntactically, ending in `*` should be enough of a signifier that this is a group, and makes scoping more clear. Scoping is very unclear for nested `@rules`, since for many of them `.foo { @rule {} }` is rewritten to `@rule { .foo {} }`. 
- It is important to be able to set these via inline styles, and the CSS Nesting story for inline styles right now is unclear.

I’m also not a fan of the dot syntax. One of the goals of this proposal was to pave the cowpaths and facilitate the patterns that are already in wide use, not introduce a new syntax pattern that needs to gain traction. Also, I think it’s a good design goal that it should not matter how a design token was defined (whether it was a group or an explicit variable declaration) at the point of usage. I.e. my component should neither need to know nor care how you defined your design tokens.

-- 
GitHub Notification of comment by LeaVerou
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9992#issuecomment-2117722870 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 17 May 2024 14:22:05 UTC