[csswg-drafts] [css-color-5] Colors where all channels (except) alpha have a value of `none` (#10203)

romainmenke has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color-5] Colors where all channels (except) alpha have a value of `none` ==
https://github.com/w3c/csswg-drafts/issues/10151#issuecomment-2052685363

@LeaVerou said:

> If all components in the source color (except alpha) are `none`, then they remain `none`. (`oklch(none none none / 0%)` is like `transparent` on steroids)


------------

I like this, I think it is useful.
It allows authors to get the full color of one side of an interpolation without knowing anything about that color.

Example:

```css
.foo {
  color: color-mix(in oklab, var(--color-a), pink);
}


.bar {
  --color-a: rgb(none none none);
}
```

The author might not know what the other color or interpolation space.
Setting a color with all channels to `none` creates a reliable way to get that `pink`.

I can even imagine a keyword for this: `opaque` which has a value of `rgb(none none none / 100%)`

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10203 using your GitHub account


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

Received on Saturday, 13 April 2024 08:45:47 UTC