Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
parasti
1y ago
0 comments
Share
You can't style the label based on input state if you do that. If you instead order them like input + label, then you can style the label with selectors like input:checked + label.
0 comments
default
newest
oldest
agos
1y ago
you can, with the power of :has!
label:has(input:checked) { background-color: orange; }
j
/
k
navigate · click thread line to collapse