Is it possible to do this with less?
a {
&:after {
background: red;
}
&:hover {
&:after {
background: blue;
}
}
}
I can't get the :after
to change color when hovering over a
?
The following works fine for me:
a {
&:after {
content:'a';
background: red;
}
&:hover {
&:after {
background: blue;
}
}
}
My LESS-enabled editor, compiled that to:
a:after {
content: 'a';
background: red;
}
a:hover:after {
background: blue;
}
Which does work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With