Skip to content

Commit 5fb9c51

Browse files
author
Tobias Bengfort
committed
reset styles for a:not([href])
See twbs/bootstrap#19411 for reference Having different styles for <a> with and without href is the default browser behavior. We could also do link styling on a[href], but that would be hard to overwrite. The downside of this solution is that it is now hard to overwrite a:not([href]), but that is a much less common task.
1 parent f135817 commit 5fb9c51

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

sass/base.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ a {
4444
}
4545
}
4646

47+
a:not([href]) {
48+
color: inherit;
49+
text-decoration: inherit;
50+
51+
&:hover, &:focus, &:active {
52+
color: inherit;
53+
}
54+
}
55+
4756
*::selection {
4857
background: $color-link;
4958
color: $color-bg;

0 commit comments

Comments
 (0)