prefers-contrast media query
Widely available since 2024-11-30
The prefers-contrast
CSS media query sets styles based on whether the user prefers more or less contrast, the difference between foreground and background colors.
Learning resources on MDN
Browser support
- Chrome 96 Released on 2021-11-15
- Chrome Android 96 Released on 2021-11-15
- Edge 96 Released on 2021-11-19
- Firefox 101 Released on 2022-05-31
- Firefox for Android 101 Released on 2022-05-31
- Safari 14.1 Released on 2021-04-26
- Safari on iOS 14.5 Released on 2021-04-26
Surveys
- State of HTML 2024: accessibility/accessibility_techniques question
- State of HTML 2023: accessibility/accessibility_techniques question
- State of CSS 2024: features/all_features question
Specifications
View web-platform-tests results for this feature - View the feature source file (dist) - Edit the feature - Report an issue about this feature