From de7cd1504b76d3f5b06f65adc83962d246f1b710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bontems?= <67456035+cbontems@users.noreply.github.com> Date: Fri, 8 Dec 2023 00:45:34 +0100 Subject: [PATCH] feat(custom-media): add --forcedColors to the custom media queries list (#445) * feat(custom-media): add --forcedColors to the custom media queries list * docs(custom-media): add --forcedColors to the Preference Vars secction of the docs site --- docsite/index.html | 2 ++ src/props.media.css | 2 ++ src/props.media.js | 2 ++ 3 files changed, 6 insertions(+) diff --git a/docsite/index.html b/docsite/index.html index 5224905a..0eca73b5 100644 --- a/docsite/index.html +++ b/docsite/index.html @@ -3365,6 +3365,8 @@
Preference Vars
@custom-media --motionOK (prefers-reduced-motion: no-preference); @custom-media --motionNotOK (prefers-reduced-motion: reduce); + + @custom-media --forcedColors (forced-colors: active); diff --git a/src/props.media.css b/src/props.media.css index 134a983d..47b95cd9 100644 --- a/src/props.media.css +++ b/src/props.media.css @@ -11,6 +11,8 @@ @custom-media --highContrast (prefers-contrast: more); @custom-media --lowContrast (prefers-contrast: less); +@custom-media --forcedColors (forced-colors: active); + @custom-media --portrait (orientation: portrait); @custom-media --landscape (orientation: landscape); diff --git a/src/props.media.js b/src/props.media.js index 64edee88..efd808a5 100644 --- a/src/props.media.js +++ b/src/props.media.js @@ -12,6 +12,8 @@ export const CustomMedia = { "--highContrast": "(prefers-contrast: more)", "--lowContrast": "(prefers-contrast: less)", + "--forcedColors": "(forced-colors: active)", + "--portrait": "(orientation: portrait)", "--landscape": "(orientation: landscape)",