Bug 232041 - inverted-colors media query matches smart invert and not classic invert
Summary: inverted-colors media query matches smart invert and not classic invert
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 15
Hardware: Unspecified macOS 11
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-20 14:01 PDT by Luke
Modified: 2021-11-09 13:21 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke 2021-10-20 14:01:47 PDT
https://www.w3.org/TR/mediaqueries-5/#inverted - The media queries level 5 spec is pretty clear that the inverted-colors media query should only match when all pixels have been inverted (as is the case with macOS' Classic Invert setting) and NOT when the UA has done some smart invert (as is the case with macOS' "Invert colours" setting when "Classic Invert" isn't also checked).

Safari (at least on macOS) does the opposite of this. When "Invert colours" is checked, but "Classic Invert" is not, the media query matches. But when "Classic Invert" is then toggled the media query no longer matches.

It would be good if Safari was updated to match the specs behaviour, cause otherwise this media query is effectively useless to developers.
Comment 1 Radar WebKit Bug Importer 2021-10-27 14:02:32 PDT
<rdar://problem/84726757>