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

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

From: Una Kravets via GitHub <sysbot+gh@w3.org>
Date: Wed, 11 Nov 2020 17:13:31 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-725547423-1605114810-sysbot+gh@w3.org>
@upsuper 

Consider the following HTML on a media site, where each card highlights a specific type of news post:

```html
<div class="card highlight"></div>
<div class="card politics"></div>
<div class="card fashion"></div>
```

```css
.card {
  border: color-mix(currentBackground, #ccc, 50%)
}

.highlight {
  background-color: yellow;
}

.fashion {
  background-color: blue;
}

.politics {
  background-color: green;
}
```

All cards should read from their background colors, but all background colors are unique. This is not an uncommon pattern.

-- 
GitHub Notification of comment by una
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5292#issuecomment-725547423 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 17:13:33 UTC

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