DEV Community

Discussion on: How I Implemented the Dark Mode on My Website

Collapse
 
babalasisi profile image
Omatozaye

CSS file, what I just want to know is will I have a whole different CSS file where the website's dark style is already written and all the button does is switch between both light and dark

Thread Thread
 
francoscarpa profile image
Franco Scarpa

You don’t need a separate CSS file. I just use CSS variables. The JavaScript code of the button toggles between them.

Thread Thread
 
babalasisi profile image
Omatozaye

Thanks, I just wanted to be certain, I'd implement it as soon as I can. I feel