W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2018

Re: [csswg-drafts] [filters] Proposal: color-filter

From: Amelia Bellamy-Royds via GitHub <sysbot+gh@w3.org>
Date: Tue, 03 Jul 2018 23:31:56 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-402320399-1530660715-sysbot+gh@w3.org>
One option might be to make sure that the color filters are available as modifiers within the color modification functions, whenever they are spec'd again.

An author could then integrate that with variables, for something like:

```css
main {
  color: filter-color(var(--text-color), var(--global-color-filter));
  background: filter-color(var(--bg-color), var(--global-color-filter));
}

:root.dark {
  --global-color-filter: invert(100%);
}
```

Much more verbose, but also much more flexible, so the effect can be targetted exactly as the author intends.


-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2875#issuecomment-402320399 using your GitHub account
Received on Tuesday, 3 July 2018 23:31:59 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 3 July 2018 23:32:01 UTC