Answers for "using ampersand css"

CSS
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 { }
}
Posted by: Guest on March-31-2021

Browse Popular Code Answers by Language