light-dark()
Newly available since 2024-05-13
The light-dark()
CSS function accepts two colors and uses one depending on the current color scheme.
Learn more
Specifications
Browser support
- Chrome 123 Released on 2024-03-19
- Chrome Android 123 Released on 2024-03-19
- Edge 123 Released on 2024-03-22
- Firefox 120 Released on 2023-11-21
- Firefox for Android 120 Released on 2023-11-21
- Safari 17.5 Released on 2024-05-13
- Safari on iOS 17.5 Released on 2024-05-13
Developer signals
- State of CSS 2025: reading_list/reading_list question
- State of CSS 2025: features/all_features question
- State of CSS 2024: usage/favorite_new_features question
- State of CSS 2024: reading_list/reading_list question
- State of CSS 2024: features/all_features question
Usage (according to Chrome Platform Status)
~0.637% of page loads. More data at chromestatus.
Web Platform Tests (WPT)
View the latest WPT test results for this featureView as JSON | Edit this feature | Report an issue | Web-features entry: source, dist