Author: Cédric Bontems [67456035+cbontems@users.noreply.github.com]
Committer: GitHub [noreply@github.com] Thu, 07 Dec 2023 23:45:34 +0000
Hash: de7cd1504b76d3f5b06f65adc83962d246f1b710
Timestamp: Thu, 07 Dec 2023 23:45:34 +0000 (9 months ago)

+6 -0 +/-3 browse
feat(custom-media): add --forcedColors to the custom media queries list (#445)
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
1diff --git a/docsite/index.html b/docsite/index.html
2index 5224905..0eca73b 100644
3--- a/docsite/index.html
4+++ b/docsite/index.html
5 @@ -3365,6 +3365,8 @@
6
7 @custom-media --motionOK (prefers-reduced-motion: no-preference);
8 @custom-media --motionNotOK (prefers-reduced-motion: reduce);
9+
10+ @custom-media --forcedColors (forced-colors: active);
11 </code></pre>
12 </div>
13 </div>
14 diff --git a/src/props.media.css b/src/props.media.css
15index 134a983..47b95cd 100644
16--- a/src/props.media.css
17+++ b/src/props.media.css
18 @@ -11,6 +11,8 @@
19 @custom-media --highContrast (prefers-contrast: more);
20 @custom-media --lowContrast (prefers-contrast: less);
21
22+ @custom-media --forcedColors (forced-colors: active);
23+
24 @custom-media --portrait (orientation: portrait);
25 @custom-media --landscape (orientation: landscape);
26
27 diff --git a/src/props.media.js b/src/props.media.js
28index 64edee8..efd808a 100644
29--- a/src/props.media.js
30+++ b/src/props.media.js
31 @@ -12,6 +12,8 @@ export const CustomMedia = {
32 "--highContrast": "(prefers-contrast: more)",
33 "--lowContrast": "(prefers-contrast: less)",
34
35+ "--forcedColors": "(forced-colors: active)",
36+
37 "--portrait": "(orientation: portrait)",
38 "--landscape": "(orientation: landscape)",
39