Jhey ʕ·ᴥ· ʔ @jhey.dev · Apr 26

dynamic toggle with CSS :has() 🎁 .control:not(:has(:first-of-type:checked)) .indicator { translate: 100% 0; } leverage [type=radio]:checked with :has() to set the visuals 🤙

292 likes 8 replies

?

Replies

Jesse Sutherland · Apr 26

Looks awesome. Quick q: do you use a standard codepen template for the demos?

Nate van der Vis · Apr 26

That's that good stuff

Egomes · Apr 26

that's pretty mind blowing

Cory 🧋 · Apr 26

woahhh

Eric Clemmons, CEO of JavaScript Fatigue · Apr 26

Ooooooh that debug view says it all

@lukefloden.com · Apr 27

This is slick

Josh Leslie · Apr 27

Nice work, but in this use case you're adding a click / nesting for a non-subordinate state which is counterintuitive