Skip to content

Commit f2a008c

Browse files
committed
[mediaqueries-5] Add forced-colors MQ. #3807
1 parent d7acc15 commit f2a008c

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

mediaqueries-5/Overview.bs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,36 @@ Detecting the desire for light or dark color schemes: the 'prefers-color-scheme'
650650
so that 'prefers-color-scheme' reflects preferences appropriate to the medium
651651
rather than preferences take out of context.
652652

653+
<h3 id="forced-colors">
654+
Detecting a forced color palette: the 'forced-colors' feature</h3>
655+
656+
<pre class='descdef mq'>
657+
Name: forced-colors
658+
Value: none | active
659+
For: @media
660+
Type: discrete
661+
</pre>
662+
663+
The 'forced-colors' media feature is used to detect if
664+
the user agent has enabled a <a>forced colors mode</a>
665+
where it enforces a user-chosen limited color palette on the page.
666+
667+
<dl dfn-type=value dfn-for="@media/prefers-color-scheme">
668+
<dt><dfn>none</dfn>
669+
<dd>
670+
<a>Forced colors mode</a> is not active;
671+
the page's colors are not being forced into a limited palette.
672+
673+
<dt><dfn>active</dfn>
674+
<dd>
675+
Indicates that <a>forced colors mode</a> is active.
676+
The UA will provide the color palette to authors
677+
through the CSS system color keywords
678+
and, if appropriate, trigger the appropriate value of 'prefers-color-scheme'
679+
so that authors can adapt the page.
680+
See [[!css-color-adjust-1#forced]] for details.
681+
</dl>
682+
653683
<h2 id="changes" class="no-num">
654684
Changes</h2>
655685
<h3 id="changes-2017">

0 commit comments

Comments
 (0)