Color gets applied when using :visited
pseudo class.
<a href="#" class="footer__link">Company</a>
.footer {
&__link {
&:link,
/*&:visited*/ {
color: yellow ;
}
}
}
Color gets applied when using :visited
pseudo class.
<a href="#" class="footer__link">Company</a>
.footer {
&__link {
&:link,
/*&:visited*/ {
color: yellow ;
}
}
}
3
Answers
you don’t need to nest it or make it any complicated.
I think this should work for you.
your nesting is completely fine,
i copied your code and run it in codepen and it worked properly , there are just 2 possibility about the issue
,
" after the&:link
which is unlikely the issue to be about this part but test it.//
" , the whole line becomes comment and then the first curly bracket becomes as a part of comment and then you declaration fails due to lack of first "{
"You don’t need any extra code, Just copy and paste the below code and it will work just fine.