Re:The Future of CSS: Easy Light-Dark Mode Color Switching w...
by qingcharles on Monday October 09, 2023 @09:44PM
(#37827686)
Well, most people implement it using JavaScript if you want everything to be in the correct order. I use a pure CSS variant as I'm trying to go near-zero JS on my projects these days, but it means things are out-of-order. Depends on your use case.
I also check for CSS support in the browser using the "supports" feature and utilize the native support if it is enabled (e.g. Firefox behind a flag, and Safari behind a switch).
I also check for CSS support in the browser using the "supports" feature and utilize the native support if it is enabled (e.g. Firefox behind a flag, and Safari behind a switch).