Skip to content

feat: implementation of contrast-color() from the CSS Color 5#1160

Open
yisibl wants to merge 1 commit intoparcel-bundler:masterfrom
yisibl:contrast-color
Open

feat: implementation of contrast-color() from the CSS Color 5#1160
yisibl wants to merge 1 commit intoparcel-bundler:masterfrom
yisibl:contrast-color

Conversation

@yisibl
Copy link
Contributor

@yisibl yisibl commented Feb 25, 2026

The former name of contrast-color() was color-contrast(). In CSS Color 5, its syntax has been simplified to:
contrast-color() = contrast-color( <color> )

Spec: https://drafts.csswg.org/css-color-5/#contrast-color

This function is part of interop-2026 and is already supported in Firefox 146 and Safari 26.

This implementation solely parses functions, enabling color values within contrast-color() to be compressed or simplified.

Part of #99

@yisibl yisibl marked this pull request as ready for review February 25, 2026 15:04
This implementation solely parses functions, enabling color values within `contrast-color()` to be compressed or simplified.

Spec: https://drafts.csswg.org/css-color-5/#contrast-color

`contrast-color() = contrast-color( <color> )`

Part of parcel-bundler#99
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