Skip to content
Discussion options

You must be logged in to vote

Luckily, I found a solution. This behavior is explained here https://blogs.windows.com/msedgedev/2020/09/17/styling-for-windows-high-contrast-with-new-standards-for-forced-colors/

All I had to do was:

body {
    forced-color-adjust: none;
}

You may also target specific affected elements if you wish to allow users to have their preferred experience but prevent overwrites of specific background colors (I recommend that for apps, but I am making a game so can't allow any of that nonsense):

@media (forced-colors: active) {
    .some_element {
        forced-color-adjust: none;
    }
}

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@kr4ft3r
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by kr4ft3r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants