Skip to content

Possible to disable OS-level High Contrast alterations? #21

Closed
@comp615

Description

@comp615

As I read the spec, and the Microsoft implementation, it seems like high-contrast color alterations are applied by the browser as a sort of media query. Then on top of these browser changes, we as developers can apply our own media queries to override those.

My question is about the dreaded css-in-js debate. At Twitter, we do not use media queries and are strict css-in-js via React Native styles. Thus for handling something like night mode, or high contrast night mode, we simply swap our color palette and re-render. I worry that in Windows high-contrast mode, the OS would still apply its enhancements on top of our specific theme.

I know that we can simply run the media query to see if we should use our high contrast palette, but is there a way to then signal that the OS should skip applying any special formatting?

Thanks!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions