DEV Community

loading...

Discussion on: How hard is it add a dark mode to a website?

Collapse
jappyjan profile image
jappyjan

It's all about your CSS structure.

If you're using CSS by variables for all colours you're good to go. Just create some JavaScript with switches those variables depending on the current Dark or light mode.

If your using old school CSS with colors set by hand in every single declaration... Well... Have fun refactoring.

I guess option 2 is the main reason which stops larger applications from implementing a dark mode...

Collapse
shripathy profile image
Shripathy πŸš€ Author

Hey @jappyjan thanks for the response unfortunately the option 2 is where my application is at. I'll make sure to upgrade my css quality too.