Re: [csswg-drafts] [css-variables] Whether to support override a property using itself? (#876)

This isn't possible given how CSS parsing works - if you use the same property multiple times in a rule, all but the latest is automatically discarded. So in your example, only the `--main-color: var(--main-color, #666);` gets seen by CSS.

(And as it turns out, this doesn't work either - it does *not* set `--main-color` to `#666`, it makes it the guaranteed-invalid value, since the property is involved in a cycle with itself and thus is overridden to be the guaranteed-invalid value.)

GitHub Notification of comment by tabatkins
Please view or discuss this issue at using your GitHub account

Sent via github-notify-ml as configured in

Received on Wednesday, 28 July 2021 20:30:15 UTC