8000 [css-mediaqueries] Inverted-colors media feature can cause problems on semi-transparent images. · Issue #9674 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-mediaqueries] Inverted-colors media feature can cause problems on semi-transparent images. #9674

@emilio

Description

@emilio

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

User agents must add the following rule to their UA style sheet:

@media (inverted-colors) {
  img:not(picture>img), picture, video { filter: invert(100%); }
}

However, this causes problems for icons and similar things that are meant to be semi-transparent above the background. Also, doesn't account for other things like background-image.

Consider this straight-forward test-case. Per spec, when inverting colors, the icon is completely invisible.

Should we remove this rule, leaving it up to sites to invert only the images they want to invert? Or should we try to do something smarter?

cc @CanadaHonk @frivoal

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0