light-dark()

Widely Available (since 2026-11-13)

The light-dark() CSS function accepts two colors and uses one depending on the current color scheme.

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
⌂ 换网址