C
C
Cyril2018-02-04 22:34:56
css
Cyril, 2018-02-04 22:34:56

Contiguous relatives in sass, how to set via :hover?

Subject,

<div>
<div class="hover"></div>
<div class="opacity0"></div>
</div>

How to with :hover effect on .hover, give opacity property to .opacity0 element using sass? I did not find a solution for sass in the open spaces.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2018-02-04
@cyril_b

So:

.hover:hover + .opacity0 {
  opacity: 0;
}

Demo: https://jsfiddle.net/rockon404/hwxfw8au/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question