S
S
Stepan0072022-02-16 11:12:53
css
Stepan007, 2022-02-16 11:12:53

Why doesn't hover work on a child element in sass?

Why does hover not work on a child element in sass
https://jsfiddle.net/oqd45263/
This works, but changes the block

.author__info
  cursor: pointer

  &:hover
    border: 2px solid red


And when you try to change the styles of a child element, it does not change
.author__info
  cursor: pointer

  &:hover > .author__name
    border: 2px solid red

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mesuti, 2022-02-16
@Stepan007

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question