all 2 comments

sorted by: hot top controversial new old
[–] 2 points 1 month ago

I mean, light-dark is great as a function to have to enbrief specifically the use-case of light vs dark themes, but that duality is so limited I don't even use the function. I use media queries and prefers-color-scheme to be able to support arbitrary themes easily. This way I have to worry about compatibility far less, too.

  • source
  • [–] 2 points 1 month ago

    It’s available in all relevant browsers since 2024 so there is not one single real reason to not use it.

    I still prefer the prefers-color-scheme media query because it makes it easier to properly separate the color schemes in code.

  • source