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

I've played around some with stuff weird values into custom properties and these questions are related to that experience.

Currently, using a variable inside curly braces doesn't compute properly, e.g. a rule with `--foo: { background: var(--color); }` computes to `''` but without the `var` like `--foo: { background: red; }`, it computes fine. I just wanted to make sure that there's not some difficult to change parsing behavior there that would cause problems for this proposal.

You also noted that since groups define constituent properties, they compose with individual ones, but I'm wondering how this works if I want to override only part of a group (and sorry if this was covered somewhere)?

```css
body {
  --p {
    1: 1px; 
  }
  --p-2: 2px;
}

div {
  --p: {
    3: 3px;
  }
}
```
On `div` are `--p-1`, `--p-2`, and `--p-3` all computed as set here? If so, great =).

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


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

Received on Monday, 23 September 2024 17:47:59 UTC