Toggle Dark Mode with CSS :has()
The CSS :has() selector can be used to toggle dark mode, light mode, and themes with zero Javascript, just HTML and CSS. :has() finally arrived in all major browsers, having dropped in Firefox December 2023.
Tags
Creator
Share this item
Have feedback or a question related to this item? Drop us some feedback!
Curated:
1.15.24
Dark Mode Toggle With Webflow Variables
11.28.23
How to Build Simple Chrome Extensions w/ Keegan Leary
2.21.23
Webflow Forms: Any CRM, Totally Customized
11.2.22
How to make text responsive with clamp
2.27.24
Color Scroll Interaction With Webflow Variables
12.17.23
Animate a Video With Native Webflow Interactions
11.28.23
A New Framework for Color in Webflow
5.11.23
BEM Class Naming Convention in Webflow
11.25.20
JavaScript Inside Webflow Components
8.11.24
Control Rive animation in Webflow using GSAP
7.12.24
How to make numbers count using Webflow interactions
3.20.24
MAST CSS Framework for Webflow — a quick explainer and comparison
12.6.23
Unmask Sections While Scrolling in Webflow
3.3.23
Connect Webflow to Airtable, Mailchimp and Slack with Webflow Logic
2.4.23
Add interactivity to your Webflow sites with Rive
1.7.23
Build a Buzzfeed Style Quiz in Webflow
11.28.22
Subscribe for updates
Get updates on the latest curated resources and be the first to hear of new features.
SubscribeStyle, type, and motion in harmony, architectural web glory, AI your brand
When AI becomes your copilot, make sure you still know how to fly the plane.
Featured inspo
Lucas Bonomi
5Four Digital
Melike Turgut
Aardvark Book Club