CSS now comes with a utility function named light-dark(). This function allows you to change a color value based on whether Light Mode or Dark Mode is being used. It is an intermediary step towards a final solution for responding to different color schemes.
Table of contents
# Responding to Light or Dark Mode# Responding to Light or Dark Mode with light-dark()# What about other non- <color> values and responding to other color schemes?# Browser Support# Demo# Spread the word3 Comments
Sort: