Menu

Our stylesheet has no forced-colors rules, so Windows High Contrast deletes 61 gradients from our homepage
📰

Our stylesheet has no forced-colors rules, so Windows High Contrast deletes 61 gradients from our homepage

DEV Community: css·Daniel Pertu·14 days ago
#wRsbNIDH
#devtocss#devto#dev#forced#colour
Reading 0:00
15s threshold

Our marketing site ships one stylesheet. It is 86,718 bytes, it has 13 media queries, and every one of them is min-width or hover . Searching it for the things that describe a reader's own display preferences returns nothing at all:

searched for occurrences

forced-colors 0

forced-color-adjust 0

prefers-contrast 0

prefers-reduced-motion 0

@media print 0

Canvas , LinkText , ButtonFace 0

So when somebody browses our site with a high contrast theme on, nothing in our CSS participates. The browser decides on its own, and what it decides is worth measuring rather than guessing.

Reproduce it in about ten seconds

Open pub-trivia.app , then in Chrome DevTools open the Rendering panel (Command or Control + Shift + P, type "Rendering"), scroll to Emulate CSS media feature forced-colors and set it to active .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.