Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
parasti
7 months ago
|
parent
|
context
|
favorite
| on:
Sanding UI
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.
agos
7 months ago
[–]
you can, with the power of :has!
label:has(input:checked) { background-color: orange; }
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: