Skip to content

[mediaqueries-5] Add prefers-shapes media query #9036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 33 additions & 2 deletions mediaqueries-5/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,9 @@ Prefers-* Media Features Security and Privacy</h3>
User agents and developers implementing this
specification need to be aware of this vector and take it
into consideration when deciding whether to use the feature.
Specifically `prefers-reduced-motion`, `prefers-color-scheme` and
`prefers-reduced-data` are currently of concern for exploitation.
Specifically `prefers-reduced-motion`, `prefers-color-scheme`,
`prefers-reduced-data`, `prefers-reduced-transparency` and `prefers-shapes` are currently of concern for
exploitation.
</div>

<!--
Expand Down Expand Up @@ -3141,6 +3142,36 @@ Detecting the desire for reduced data usage when loading a page: the 'prefers-re
</pre>
</div>

<h3 id="prefers-shapes">
Detecting the desire for conveying information through shapes instead of using color alone: the 'prefers-shapes' feature</h3>

<pre class='descdef mq'>
Name: prefers-shapes
Value: no-preference | active
For: @media
Type: discrete
</pre>

The 'prefers-shapes' media feature is used to detect if the user
has a preference for information to be conveyed using shapes instead
of color alone.

<dl dfn-type=value dfn-for="@media/prefers-shapes">
<dt><dfn>no-preference</dfn>
<dd>
Indicates that the user has made no preference known
to the system. This keyword value evaluates as false
in the <a>boolean context</a>.

<dt><dfn>active</dfn>
<dd>
Indicates that user has expressed a preference.
</dl>

The method by which the user expresses their preference can vary.
It might be a system-wide setting exposed by the Operating System,
or a setting controlled by the user agent.

<h3 id=auto-pref>
Automatic handling of User Preferences</h3>

Expand Down