Existe uma maneira de detectar o uso do modo escuro?

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 curtidas