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

Featured
Preview

Osmo

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

Rebrand

8.25.23

Navs.Supply

8.25.23

BuildBetter AI

8.25.23

Middesk

8.24.23

Webflail

8.23.23

deck․gallery

8.23.23

Bunsen Studio

8.21.23

The Digital Third

8.21.23

Cursor

8.19.23

TextFX

8.18.23

Strategyzer

8.18.23

toddle

8.17.23

Prismic

8.17.23

Diagram

8.17.23

Mbau

8.17.23

Thenty

8.17.23

Breeona Nechole

8.16.23

Ghost

8.16.23

SEARCH

8.16.23

Minerva

8.15.23

Modyfi

8.14.23

Framer University

8.14.23

Artifact

8.14.23

Sundown Studios

8.11.23

Sneaps

8.10.23

Hireguide

8.10.23

Splide

8.10.23

Valori

8.10.23

Webpills

8.10.23

Jetboost List Update Function

8.10.23

Lattice

8.9.23

Vanta

8.9.23

VICIO

8.7.23

Intro to the Relume Site Builder

8.7.23

Gantry

8.5.23

Pricer

8.5.23

Critical Danger

8.5.23

David Lee

8.4.23

Download all Webflow Redirects as CSV

8.4.23

Vidzflow

8.3.23

Interfacer

8.3.23

PACT

8.3.23

Units

8.3.23

IKON Property

8.3.23

Ropes & Twines

8.3.23

Off-Grid

8.2.23

Essentials

8.2.23

Covert CSS to Webflow Styles

7.31.23

MWM

7.31.23

Framer Training

$299
7.31.23

Oyster

7.27.23

Curri

7.27.23
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.