https://skl.sh/designcourse22 - First 500 people to sign up will get their first 2 months free!
-- Giving your users the option to toggle between a light and dark mode can be a nice feature. A dark mode can be easier to read and also reduce battery consumption on mobile devices. Today, I'm going to show you how to integrate this feature using data attributes and native CSS variables -- along with a little bit of JavaScript.
Codepen for this tutorial:
https://codepen.io/designcourse/pen/OGVZjr
Referenced Codepen for the toggle switch:
https://codepen.io/mburnette/pen/LxNxNg
Referenced tutorial on dark / light themes:
https://medium.com/@mwichary/dark-theme-in-a-day-3518dde2955a
Let's get started!
- - - - - - - - - - - - - - - - - - - - - -
Subscribe for NEW VIDEOS!
My site: https://designcourse.com
My personal FB account: http://fb.com/logodesigner
Coursetro FB: http://fb.com/coursetro
Coursetro's Twitter: http://twitter.com/designcoursecom
Join my Discord! https://discord.gg/a27CKAF
^-Chat with me and others
- - - - - - - - - - - - - - - - - - - - - -
Who is Gary Simon? Well, I'm a full stack developer with 2+ decades experience and I teach people how to design and code. I've created around 100+ courses for big brands like LinkedIn, Lynda.com, Pluralsight and Envato Network.
Now, I focus all of my time and energy on this channel and my website Coursetro.com.
Come to my discord server or add me on social media and say Hi!