Bug 259418 - Web Inspector: Add emulation for inverted-colors
Summary: Web Inspector: Add emulation for inverted-colors
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Safari 17
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-07-22 12:23 PDT by Luke Warlow
Modified: 2023-07-29 12:24 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Warlow 2023-07-22 12:23:52 PDT
Currently WebInspector allows emulation of prefers-color-scheme, prefers-contrast and prefers-reduced-motion. `inverted-colors` should be added to that.
Comment 1 Luke Warlow 2023-07-22 13:38:02 PDT
Pull request: https://github.com/WebKit/WebKit/pull/16014
Comment 2 Luke Warlow 2023-07-25 12:27:51 PDT
While this is easy enough to add in naiive way (see my attempt linked above), the emulation isn't neccesarily useful to developers as the page would still be not-inverted but then the media would be inverted by the UA style sheet.

This would probably require a more involved mechanism for emulation. Potentially while being forced by dev tools it should add a filter(100%) to the styles for `:root`? Not sure how easy this would be to do with WebKit's existing emulation system?
Comment 3 Radar WebKit Bug Importer 2023-07-29 12:24:16 PDT
<rdar://problem/113084054>