This is with reference to this codepen here https://codepen.io/jamesbarnett/pen/vlpkh?editors=1100
I'm was looking for some Pure CSS Star Rating system. I got really confused with the statement
.rating:not(:checked) > label:hover
Can someone explain me how is it possible?? A .rating
is a fieldset element. How can we even apply a :not(:checked)
selector to it. It's never going to be checked. Had this been .rating input:not(:checked)
, it would have made sense to me.
Is it like it is somehow selecting the inputs inside it. Cause I am not able to find any documentation supporting this behavior of CSS :not
selector.
I'm not able to understand how it is working surprisingly.