3 ms·
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 in
by parasti 2y ago
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 2y agoyou can, with the power of :has! label:has(input:checked) { background-color: orange; }