.test { &:before { color: $something; } } .selector::after { color: $somthing; &::hover { background-color: $red; } }