3 ms·
Seems like it could be done with a checkbox and some cash. I'm sure someone could figure it out.
by humblebee 7y ago
Seems like it could be done with a checkbox and some cash. I'm sure someone could figure it out.
- spuz 7y agoThe article has exactly this scenario as an example of where pure CSS can replace JS.
- pawelk 7y agoIt could be done using `input:checked + sibling` selector e.g. like this: https://jsfiddle.net/6bgemn0s/ https://jsfiddle.net/6bgemn0s/ For something fancier it would be possible to style a label with appropriate for="" attribute and hide the checkbox completely, then even apply some transitions: https://jsfiddle.net/6bgemn0s/1/ https://jsfiddle.net/6bgemn0s/1/
- hokus 7y agohttps://jsfiddle.net/gaby_de_wilde/ye95zcao/29/ https://jsfiddle.net/gaby_de_wilde/ye95zcao/29/