Re: [csswg-drafts] [css-values-4] inherit() function: like var() for parent value, for any property (#2864)

If my understanding is correct, this would allow for alternating color nested divs, or even rainbow nest with significantly less syntax.
```css
#parent-container {
--hue-variance: 20;
}

div {
--hue-variance:  calc(inherit(--hue-variance) * -1);
background-color: hsl(calc(100 + var(--hue-variance)) 30% 60%);
}
```
```html
<div id="parent-container">
  <div>
  <!--hue 80-->
    <div>
    <!--hue 120-->
      <div>
      <!--hue 80-->
      </div>
    </div>
  </div>
</div>
```

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


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

Received on Monday, 30 January 2023 09:19:23 UTC