Length 8:19CSS Hack: Toggle Dark Mode with :has()
About this video
A short CSS tutorial showing how to toggle dark mode, light mode and themes using the :has() selector with only HTML and CSS, no JavaScript. It assumes familiarity with writing HTML and CSS.
What you’ll learn
- Build a dark mode toggle using the CSS :has() selector
- Switch themes with HTML and CSS alone, without JavaScript
- Apply a theme toggle to a Webflow or other web page
Recommended
Length 8:19
Length 4:46
Length 9:51
Length 9:59
Length 4:25
Length 6:44
Length 2:09
Length 2:20
Length 2:37
Length 2:33
Length 2:32
Length 9:45