These are associated with one input, either by containing that input or by using the attribute for to target the id of a certain input. These inputs a

No Javascript - Waka.moe

submited by
Style Pass
2024-11-14 23:30:04

These are associated with one input, either by containing that input or by using the attribute for to target the id of a certain input.

These inputs are extremely helpful since they have 2 states that depend on user interaction, either :clicked or :not(:clicked) which can be targeted by CSS.

After targeting the state of the radio and checkbox inputs with the :checked selector we can combine that with the + selector which gives us the element placed immediately after the input and ~ which gives us all elements placed after the input. With that we style said elements according to each state of the input.

You may want to create a super light website that doesn't rely on javascript, or the audience you target doesn't like running javascript, or you may even want to make a website for TOR. And finally, why not?

Leave a Comment