DEV Community

Cover image for Light/Dark Mode Toggle Button Using 1 variable 2021 || CSS JS
Joy Shaheb
Joy Shaheb

Posted on • Updated on

Light/Dark Mode Toggle Button Using 1 variable 2021 || CSS JS

If you really want your Readers to Read All of your contents, then having a dark mode is a must on your website.

Because, A dark theme reduces the irritation on readers eyes compared to light mode.

Today, we'll make a Scalable dark/light mode toggler button, & we'll do all the calculation's using 1 scss variable.

Table Of Contents 🔥

Codepen 🔥

You can find the full code on Codepen

Youtube Tutorial 🔥

If the codepen is difficult for you then see Step by step Tutorial on Youtube 🔥

Suggestions & Criticisms are Highly Appreciated ❤️️

Top comments (1)

Collapse
 
prolover profile image
sithembiso

can you add code that will remember the mode if I chose to refresh the page