I have this SASS code to control the look of my table header cell:
th {
...
&:hover {
text-decoration: underline;
}
&:after {
font-family: $icon-font;
content: "\e917";
text-decoration: none !important; (1)
}
&:hover:after { (2)
text-decoration: none !important;
}
}
Essentially, I have text and a chevron icon (in the :after pseudo-element) after that text. On hover, I want the text to underline, but NOT the icon.
How do I achieve that?
Things I already tried:
- (1) Identifying I never want the icon to be underlined - no effect.
- (2) Controling the pseudo-element of the pseudo-class - no effect.