Y
Y
Yuri2020-08-14 01:29:05
Sass
Yuri, 2020-08-14 01:29:05

What is the correct way to write :hover, :focus value in sass?

There is a line in the css file:

:hover, :focus, :active {
Outline: 0;
}

I remove the stroke when hovering over forms, buttons, etc. Everything works in css. If you copy to a sass file, it gives an error. What is the correct way to write this in a sass file? You can write separately for each element and focus and hover and active

a: hover
outline: 0
form: focus
outline: 0

but how to do it for all at once?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Spartak (Web-StyleStudio), 2020-08-14
@Fhoenix

a,
button {
    &:hover,
    &:active,
    &:focus {
        outline: 0;
    }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question