Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(css): add missing css color-mix() function #857

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

skyclouds2001
Copy link
Contributor

Description

the css color-mix() function has been supported in all major platform for more than one year per bcd

Motivation

Additional details

https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color-mix
https://drafts.csswg.org/css-color-5/#funcdef-color-mix

Related issues and pull requests

report in csstree/validator#29

@skyclouds2001
Copy link
Contributor Author

skyclouds2001 commented Dec 26, 2024

full test log in chromium:

CSS.supports('color', 'color-mix(in oklab, #a71e14 0%, white)')
true
CSS.supports('color', 'color-mix(in srgb, #a71e14 0%, white)')
true
CSS.supports('color', 'color-mix(in srgb-linear, #a71e14 0%, white)')
true
CSS.supports('color', 'color-mix(in display-p3, #a71e14 0%, white)')
true
CSS.supports('color', 'color-mix(in a98-rgb, #a71e14 0%, white)')
true
CSS.supports('color', 'color-mix(in prophoto-rgb, #a71e14 0%, white)')
true
CSS.supports('color', 'color-mix(in rec2020, #a71e14 0%, white)')
true
CSS.supports('color', 'color-mix(in lab, #a71e14 0%, white)')
true
CSS.supports('color', 'color-mix(in oklab, #a71e14 0%, white)')
true
CSS.supports('color', 'color-mix(in xyz, #a71e14 0%, white)')
true
CSS.supports('color', 'color-mix(in xyz-d50, #a71e14 0%, white)')
true
CSS.supports('color', 'color-mix(in xyz-d65, #a71e14 0%, white)')
true
CSS.supports('color', 'color-mix(in hsl, #a71e14 0%, white)')
true
CSS.supports('color', 'color-mix(in hwb, #a71e14 0%, white)')
true
CSS.supports('color', 'color-mix(in lch, #a71e14 0%, white)')
true
CSS.supports('color', 'color-mix(in oklch, #a71e14 0%, white)')
true
CSS.supports('color', 'color-mix(in lch shorter hue, var(--base) 0%, var(--mixin) )')
true
CSS.supports('color', 'color-mix(in lch longer hue, var(--base) 0%, var(--mixin) )')
true
CSS.supports('color', 'color-mix(in lch increasing hue, var(--base) 0%, var(--mixin) )')
true
CSS.supports('color', 'color-mix(in lch decreasing hue, var(--base) 0%, var(--mixin) )')
true
CSS.supports('color', 'color-mix(in --swop5c, var(--base) 0%, var(--mixin) )')
true
CSS.supports('color', 'color-mix(in --my-color-profile, var(--base) 0%, var(--mixin) )')
true

Note

Though the <custom-color-space> syntax of <color-interpolation-method> syntax, which should be defined using non-supported @color-profile feature. Test shows that this syntax is supported in color-mix(), so added this at present.

@skyclouds2001 skyclouds2001 marked this pull request as ready for review December 26, 2024 06:54
@skyclouds2001 skyclouds2001 requested a review from a team as a code owner December 26, 2024 06:54
@skyclouds2001 skyclouds2001 requested review from bsmth and removed request for a team December 26, 2024 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant