color-mix works in Forced Colors Mode when all colors in the mix are CSS system colors
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
People
(Reporter: mozilla.org, Unassigned)
References
(Blocks 1 open bug)
Details
Steps to reproduce:
.element {
color: color-mix(in srgb, CanvasText, Canvas);
}
Actual results:
In Forced Colors Mode, the result is an inbetween color, i.e. color-mix
works.
Example: https://codepen.io/cssence/pen/abeVWYK
Expected results:
The result of the color-mix function should not aaply, instead it should be replaced with text color (currentColor), like the other mixes in the example above.
More info: https://cssence.com/2024/color-mix-in-forced-colors-mode/
Comment 1•3 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Graphics: Canvas2D' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•3 months ago
|
||
It's kind of intended that color-mix works if all the colors are system colors... Why wouldn't it? They're using the system color palette anyways.
This was an intentional change in bug 1774946, and there's some reasoning there. In particular mixing with transparent seems reasonable?
I guess the spec doesn't allow this if you read it strictly enough, so this might be worth a CSSWG issue...
Code is here, fwiw.
I guess the spec doesn't allow this if you read it strictly enough, so this might be worth a CSSWG issue...
yeah, I wrote in my accompanying blog post that I find the behavior intriguing, and wouldn't mind if that is kept. Sure enough, in that case filing a bug (or feature request) for Chromium-based browsers would be in order, because consistency across browsers would be desired.
Not sure how to proceed here!? In another instance it seems a bit more straightforward: Firefox drops border-image
in Forced Colors Mode, whereas Chromium does not. I found CSSWG issue 5469 stating that border images should be kept. So at least this one might need solving on Mozilla's side.
I've filed a CCSWG issue, let's see: https://github.com/w3c/csswg-drafts/issues/11097
CSS working group concluded that the mix can be performed, but the color to be displayed should still be a system color:
https://github.com/w3c/csswg-drafts/commit/6e6a84f2c2dff0ee5b2e23ecbbded952c65c518e
So, change required.
Description
•