Re: [csswg-drafts] [css-variables] custom property cycles not updating according to specs. (#7336)

This is per spec. `--maincolor` computes to `hsl(193, 66%, 53%)` on `:root`

> Computed value: specified value with variables substituted, or the guaranteed-invalid value

And then that's the value that will be inherited by descendants. Changing `--maincolor-l` on a descendant has no effect since it has already been substituted on `:root`. You can workaround this by setting `--maincolor` on all descendants:

```css
:root, :root * {
    --maincolor: hsl(var(--maincolor-h), var(--maincolor-s), var(--maincolor-l));
}
```

Adding a better mechanism to cover your usecase is already tracked in #2749

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


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

Received on Friday, 3 June 2022 11:07:21 UTC