How to add dark mode to your website with no CSS

by | Aug 31, 2020 | 0 comments

How to add dark mode to your website with no CSS

by | Aug 31, 2020 | CSS Tips and Tricks | 0 comments



❤ Subscribe: http://bit.ly/SubscribeDPT

In this Javascript tutorial I will show you how to add a complete dark mode to your website without writing CSS*. I will be using the DarkReader package via a CDN to instantly add dark mode capabilities to the website. Then, I will show you how to create a dark mode toggle button and write code to enable and disable the dark mode when the button is clicked.

Code used in the video: https://github.com/eyl327/DarkReader-API-Sample-Code

DarkReader on Github: https://github.com/darkreader/darkreader

CDN via jsDelivr: https://www.jsdelivr.com/package/npm/darkreader

Get free website icons from https://css.gg/

The template I used for the video is from https://freehtml5.co/

If you enjoy my videos, please like and subscribe! Let me know what you want to see more of!

*If some elements need to be fixed, you can add a few lines to correct it, but the bulk of the CSS will be done automatically by the DarkReader API.

💻 More tutorials
► https://www.youtube.com/playlist?list=PL9YUC9AZJGFHTUP3vzq4UfQ76ScBnOi-9

🎁 GET FREE STUFF WHILE SUPPORTING MY TUTORIALS
► https://bit.ly/jlawrencepromos

source