From bb7dc43d94ee25404d38160feb4be076415767a9 Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Thu, 21 Nov 2024 16:49:13 +0100 Subject: [PATCH 1/3] Add new contrast-color feature --- features/contrast-color.yml | 8 ++++++++ features/contrast-color.yml.dist | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 features/contrast-color.yml create mode 100644 features/contrast-color.yml.dist diff --git a/features/contrast-color.yml b/features/contrast-color.yml new file mode 100644 index 00000000000..6f56a39ac5e --- /dev/null +++ b/features/contrast-color.yml @@ -0,0 +1,8 @@ +name: contrast-color() +description: "The `contrast-color()` CSS function picks a color that has guaranteed contrast with the color passed as an argument." +spec: https://drafts.csswg.org/css-color-5/#contrast-color +group: color-types +compat_features: + # BCD is out of date with the spec. + # See https://github.com/mdn/content/issues/36904 + - css.types.color.color-contrast diff --git a/features/contrast-color.yml.dist b/features/contrast-color.yml.dist new file mode 100644 index 00000000000..1074eeb08c8 --- /dev/null +++ b/features/contrast-color.yml.dist @@ -0,0 +1,8 @@ +# Generated from: contrast-color.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: false + support: {} +compat_features: + - css.types.color.color-contrast From 3d1ad3eb50099436ec82282830ca870f1a2574f4 Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Thu, 30 Jan 2025 15:23:01 +0100 Subject: [PATCH 2/3] Remove BCD key --- features/contrast-color.yml | 6 +----- features/contrast-color.yml.dist | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/features/contrast-color.yml b/features/contrast-color.yml index 6f56a39ac5e..5a2a87dcc27 100644 --- a/features/contrast-color.yml +++ b/features/contrast-color.yml @@ -1,8 +1,4 @@ name: contrast-color() -description: "The `contrast-color()` CSS function picks a color that has guaranteed contrast with the color passed as an argument." +description: "The `contrast-color()` CSS function picks a text color that has guaranteed contrast with a background color." spec: https://drafts.csswg.org/css-color-5/#contrast-color group: color-types -compat_features: - # BCD is out of date with the spec. - # See https://github.com/mdn/content/issues/36904 - - css.types.color.color-contrast diff --git a/features/contrast-color.yml.dist b/features/contrast-color.yml.dist index 1074eeb08c8..5a73e74a5fe 100644 --- a/features/contrast-color.yml.dist +++ b/features/contrast-color.yml.dist @@ -4,5 +4,3 @@ status: baseline: false support: {} -compat_features: - - css.types.color.color-contrast From b1aa6b5f5c4e9d3c283391acdb8e68b71a6495c2 Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Thu, 6 Feb 2025 15:17:43 +0100 Subject: [PATCH 3/3] Reserver contrast-color and make discouraged color-contrast --- features/color-contrast.yml | 13 +++++++++++++ features/color-contrast.yml.dist | 6 ++++++ features/contrast-color.yml | 4 ++-- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 features/color-contrast.yml create mode 100644 features/color-contrast.yml.dist diff --git a/features/color-contrast.yml b/features/color-contrast.yml new file mode 100644 index 00000000000..f6a04a80c7d --- /dev/null +++ b/features/color-contrast.yml @@ -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 diff --git a/features/color-contrast.yml.dist b/features/color-contrast.yml.dist new file mode 100644 index 00000000000..ad95f078b43 --- /dev/null +++ b/features/color-contrast.yml.dist @@ -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: {} diff --git a/features/contrast-color.yml b/features/contrast-color.yml index 5a2a87dcc27..207f4fb02a6 100644 --- a/features/contrast-color.yml +++ b/features/contrast-color.yml @@ -1,4 +1,4 @@ name: contrast-color() -description: "The `contrast-color()` CSS function picks a text color that has guaranteed contrast with a background color." -spec: https://drafts.csswg.org/css-color-5/#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