Skip to content

Commit

Permalink
feat(custom-media): add --forcedColors to the custom media queries li…
Browse files Browse the repository at this point in the history
…st (#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
  • Loading branch information
cbontems authored Dec 7, 2023
1 parent 6a69d71 commit de7cd15
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docsite/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3365,6 +3365,8 @@ <h5>Preference Vars</h5>

@custom-media --motionOK (prefers-reduced-motion: no-preference);
@custom-media --motionNotOK (prefers-reduced-motion: reduce);

@custom-media --forcedColors (forced-colors: active);
</code></pre>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/props.media.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 2 additions & 0 deletions src/props.media.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)",

Expand Down

0 comments on commit de7cd15

Please sign in to comment.