[csswg-drafts] [mediaqueries-5] Example for `inverted-colors` seems to be a no-op

simevidas has just created a new issue for https://github.com/w3c/csswg-drafts:

== [mediaqueries-5] Example for `inverted-colors` seems to be a no-op ==
The example:

```css
@media (inverted-colors) {
  img { filter: invert(100%); }
  * { text-shadow: none; box-shadow: none; }
}
```

Source: https://drafts.csswg.org/mediaqueries-5/#inverted

***

If I understand correctly, the purpose of the second style rule is to revert all the text and box shadows that are on the page. However, due to the low specificity of the `*` selector, these styles will never apply. For example:

```css
h1 {
  text-shadow: 1px 1px 0 gray;
}

* {
  text-shadow: none;
}
```

Here, the second rule is a no-op. If its purpose is to revert the first rule, then `!important` is needed, I think.



Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1756 using your GitHub account

Received on Thursday, 24 August 2017 07:21:04 UTC