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

Add new contrast-color feature #2304

Merged
merged 6 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions features/color-contrast.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: color-contrast()
description: "The `color-contrast()` CSS function picks a color from a list that has the most contrast with another color."
spec: https://drafts.csswg.org/css-color-5/#contrast-color
group: color-types
discouraged:
# See these CSSWG discussions
# https://github.com/w3c/csswg-drafts/issues/7557
# https://github.com/w3c/csswg-drafts/issues/7359
according_to:
- https://github.com/w3c/csswg-drafts/issues/7557
- https://github.com/w3c/csswg-drafts/commit/36594e9e8496a5ca83f1f1ee2b4a83bcdf28753b
alternatives:
- contrast-color
6 changes: 6 additions & 0 deletions features/color-contrast.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated from: color-contrast.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support: {}
4 changes: 4 additions & 0 deletions features/contrast-color.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: contrast-color()
description: "The `contrast-color()` CSS function picks a color that has guaranteed contrast against a specified foreground or background color."
spec: https://drafts.csswg.org/css-color-6/#funcdef-contrast-color
group: color-types
6 changes: 6 additions & 0 deletions features/contrast-color.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated from: contrast-color.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support: {}