Is there a way to detect dark mode usage?

I resolved this by adding a single line of code to the Head section of each theme depending on the colors:

document.body.classList.add(“dark-theme”);

document.body.classList.add(“light-theme”);

Thanks for your inputs @Don @Lilly

2 Likes