Re: [csswg-drafts] [css-color-4] [css-color-5] Mixing with `transparent` seems broken in implementations (#8612)

In addition to transparent, the current `alpha = none` or `alpha = 0` is implemented differently in each browser.

Which browser is correct?

![Image](https://github.com/user-attachments/assets/f899028d-a122-42dd-8e2c-ab09681b9e60)

```html
data:text/html;charset=UTF-8,<!DOCTYPE html>
<style>
div {
  border: 1px solid black;
  display: inline-block;
  vertical-align: middle;
  width: 80px;
  height: 80px;
  margin-top: 10px;
} 
</style>
<div style="background-color: color-mix( in hsl longer hue, red, rgb(0 255 0 / 0%) );">longer</div>
<div style="background-color: color-mix( in hsl shorter hue, red, rgb(0 255 0 / 0%) );">shorter</div>
<div style="background-color: color-mix( in hsl increasing hue, red, rgb(0 255 0 / 0%) );">increasing</div>
<div style="background-color: color-mix( in hsl decreasing hue, red, rgb(0 255 0 / 0%) );">decreasing</div>

<br>
<div style="background-color: color-mix( in hsl longer hue, red, rgb(none 255 0 / 0%) );">longer + r = none</div>
<div style="background-color: color-mix( in hsl shorter hue, red, rgb(0 255 none / 0%) );">shorter + b = none</div>
<div style="background-color: color-mix( in hsl longer hue, red, rgb(0 255 0 / none) );">longer + alpha = none</div>
<div style="background-color: color-mix( in hsl shorter hue, red, rgb(0 255 0 / none) );">shorter + alpha = none</div>

<br>
<div style="background-color: color-mix( in oklch, red, rgb(0 255 0 / 0%) );">oklch</div>
<div style="background-color: color-mix( in oklab, red, rgb(0 255 0 / 0%) );">oklab</div>
<div style="background-color: color-mix( in srgb, red, rgb(0 255 0 / 0%) );">srgb</div>
<div style="background-color: color-mix( in srgb-linear, red, rgb(0 255 0 / 0%) );">srgb-linear</div>
<div style="background-color: color-mix( in lab, red, rgb(0 255 0 / 0%) );">lab</div>
```

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


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

Received on Thursday, 13 February 2025 07:23:55 UTC