I dont know about this, but I use javascript onclick() function to handle dark and light mode by just appending a css class to particular element, and can change back by clicking the same button or reloading the page
That is absolutely a valid way to change between styles. Maybe I should've been more clear in my writing, that I'm interested in using the OS light/dark setting to affect CSS as a kind of responsiveness.
then its cool, i hope i knew this before, atleast i would saved my time instead of appending class to each and every section and styling them in a different way.
Thanks for the info
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I dont know about this, but I use javascript onclick() function to handle dark and light mode by just appending a css class to particular element, and can change back by clicking the same button or reloading the page
That is absolutely a valid way to change between styles. Maybe I should've been more clear in my writing, that I'm interested in using the OS light/dark setting to affect CSS as a kind of responsiveness.
Light/Dark Mode depends on OS you use, you no need to click on or off to switch mode.
then its cool, i hope i knew this before, atleast i would saved my time instead of appending class to each and every section and styling them in a different way.
Thanks for the info