Answer the question
In order to leave comments, you need to log in
How to manage variables on hover in scss?
Good afternoon! I didn’t find any information in Google, I need it to change its background from a predefined array of colors when hovering over the button.
Has anyone done something similar already?
Answer the question
In order to leave comments, you need to log in
What can't be done with CSS can't be done with SCSS.
CSS does not allow you to select a random attribute from the list, here you can’t do without JS.
$primary: blue;
$second: green;
button{
background-color: $primary;
&:hover{
background-color: $second;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question