mozilla / standards-positions

https://mozilla.github.io/standards-positions/
Mozilla Public License 2.0
633 stars 69 forks source link

CSS Values 4: mix() #810

Open CanadaHonk opened 1 year ago

CanadaHonk commented 1 year ago

Request for Mozilla Position on an Emerging Web Specification

Other information

No engines implement or ship this yet.

CanadaHonk commented 1 year ago

CC also @dholbert

emilio commented 1 year ago

I think generally looks good. The main concern is implementation (this needs to be supported at the declaration-value level, for all properties, which can be tricky).

zcorpan commented 1 year ago

Are there use cases that aren't covered by calc() and color-mix()?

How does this work for shorthands?

emilio commented 1 year ago

To clarify the shorthand question:

background: url(foo.png) transparent;
background-color: mix(10%; red; blue);

How should .cssText or style.background serialize, since mix() is invalid at other than a declaration level? Similarly, background: mix(...);, how does .style.backgroundColor serialize? That all needs spec text.

polyzen commented 3 months ago

Seems this can be closed: https://github.com/mozilla/wg-decisions/issues/1316

mix() itself was abandoned, but may be implemented another way: https://github.com/w3c/csswg-drafts/issues/9658