Re: [csswg-drafts] [css-color-5] Add `currentBackgroundColor` Variable (#5292)

> Other than backgrounds being likely defined in an ancestor and possibly not being just a plain color, what about cycles?
> 
> ```css
> color: currentBackgroundColor;
> background-color: currentColor;
> ```

Same as `color: currentColor`. 

> A note RE: the parent value, since background-color is not inherited, if the card background is lightblue, and one wanted to use `currentBackground` on a child element, they would have to set its background to `inherit`. Not ideal but workable. It would be nice if there was a way to grab the first inherited background in this case. `closestBackgroundColor` maybe?

Maybe time to revive https://github.com/w3c/csswg-drafts/issues/2864 ?


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


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

Received on Wednesday, 11 November 2020 13:07:25 UTC