Good afternoon, tell me, is it possible to choose a parent with a hover or the focus of a child element without js. For example, samples can be nth-of-type :not ~ +, etc. Suppose we have the following nesting type:

 <label> <input> </label> 

Can I somehow focus on the event or hover on input to choose a label ?

  • can not. (7 characters you need ...: \) - Moonvvell

1 answer 1

There is a limitation in CSS - it is impossible to contact ancestors. No
Like previous elements.
Use JS .