Skip to content

Commit

Permalink
[mediaqueries-5] Remove inverted-colors UA rule (#9812)
Browse files Browse the repository at this point in the history
Change it to an author suggestion. Closes #9674.
  • Loading branch information
CanadaHonk authored Jan 19, 2024
1 parent 2303f56 commit 6ea2265
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions mediaqueries-5/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1985,8 +1985,7 @@ Detecting inverted colors on the display: the 'inverted-colors' feature</h3>

This value must not match
if the user agent has done some kind of content aware inversion
such as one that preserves the images
(except through its UA style sheet, see below).
such as one that preserves the images.

Note: This is because the goal of this media feature
is to enable authors to mitigate the undesirable effects of the non content aware approach
Expand All @@ -1996,21 +1995,22 @@ Detecting inverted colors on the display: the 'inverted-colors' feature</h3>

</dl>

User agents must add the following rule to their [=UA style sheet=]:
<div class="example">
Depending on their style sheet,
authors may wish to invert images and videos:

<pre><code class=lang-css>
@media (inverted-colors) {
img:not(picture>img), picture, video { filter: invert(100%); }
}
</code></pre>
<pre class="lang-css">
@media (inverted-colors) {
img:not(picture > img), picture, video {
filter: invert(100%);
}
}
</pre>

<div class="example">
In addition to this UA style sheet rule,
and depending on their style sheet,
authors may also wish to invert images injected via CSS (such as backgrounds),
or to disable shadows:
Authors may also invert images injected via CSS (such as backgrounds),
or disable shadows:

<pre>
<pre class="lang-css">
@media (inverted-colors) {
* {
text-shadow: none !important;
Expand Down

0 comments on commit 6ea2265

Please sign in to comment.