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.
To learn more, see
light-dark() at MDN.
Compatibility
- 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