Toggle Dark Mode with CSS :has()

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.

Have feedback or a question related to this item? Drop us some feedback!

Curated: 
1.14.24

Similar items

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Crafted

2.25.21

ANDY WORKS

2.23.21

Refokus

2.23.21

Murmur

2.23.21

FlutterFlow

2.22.21

Enovix

2.22.21

Swipe Webflow Tabs

2.18.21

Builder.ai

2.17.21

TRWM

2.17.21

Button

2.16.21

Wannathis

2.15.21

Glimpse

2.15.21

Studioarte

2.15.21

Weav

2.11.21

OpenTent

2.11.21

Opsyne

2.11.21

Brink

2.9.21

SmugMug

2.9.21

Blott.io

2.8.21

The Homebug

2.5.21

Reinier Martin

2.5.21

Random Shuffle Sort CMS Items

2.5.21

ShareCalmly

2.4.21

Good + Ready

2.3.21

Unit

2.3.21

OAK'S LAB

2.2.21

AngelList Venture

2.1.21

Don Carlo

2.1.21

Grilli Type

1.25.21

THE THIRD STRIKE

1.25.21

Granyon

1.25.21

Aurélia Durand

1.25.21

Women of Commerce

1.22.21

Super Mega Pack

1.21.21

Beeper

1.21.21

Tomasz Strekowski

1.21.21

sa.design

1.20.21

Abacum

1.20.21

Webflow Merch Store

1.19.21

Hopin

1.19.21

Point

1.19.21

Lauren Waller

1.19.21

Vori

1.18.21

LoneUX

1.15.21

Trap Focus in Modal/Dialog/Cart

1.14.21

FactoryFix

1.13.21

MNKY Chau

1.13.21

Teamflow

1.13.21

Grain

1.12.21

Detect Spanish Language and Redirect

1.11.21

Set Equal Heights Based on Tallest

1.11.21

Accel

1.7.21
Load more

Bummer, no results

Try a different search/filter combo, or drop us some feedback if there is something missing you would love to see!

Reset filters

Subscribe for updates

Get updates on the latest curated resources and be the first to hear of new features.