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
?
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.
This is also work fine for me : -
a{
&:after{
background: red;
content: "Hover Text"
}
&:hover{
&:after{
background: yellow;
}
}
}
And My terminal Compile that to:-
a:after {
background: red;
content: "Hover Text";
}
a:hover:after {
background: yellow;
}
a {
&:after {
background: red;
}
&:hover,
&:after {
background: blue;
}
}
This is okay now :P