W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2020

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

From: Lea Verou via GitHub <sysbot+gh@w3.org>
Date: Wed, 11 Nov 2020 13:07:23 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-725413163-1605100042-sysbot+gh@w3.org>
> 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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:22 UTC