ampersand css code example
Example 1: ampersand css
//there is a lot of repetition
.button:visited {
//style goes here
}
.button:hover {
//style goes here
}
button:active {
//style goes here
}
//this can be simplified by using an ampersand
.button {
&:visited { }
&:hover { }
&:active { }
}
Example 2: scss hover
.class {
margin:20px;
&:hover {
color:yellow;
}
}