Skip to content

Commit 40c81c2

Browse files
committed
Merge pull request #19411 from patrickhlauke/v4-links-not-anchors
Neutralize link styles for placeholder links/named anchors
2 parents 01be344 + c4b0870 commit 40c81c2

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

scss/_reboot.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,25 @@ a {
171171
}
172172
}
173173

174+
// and undo these styles for placeholder links/named anchors (without href)
175+
// would be more straightforward to just use a[href] in previous block, but this
176+
// causes specificity issues in many other styles that are too complex to fix
177+
// see https://github.com/twbs/bootstrap/issues/19402
178+
179+
a:not([href]) {
180+
color: inherit;
181+
text-decoration: none;
182+
183+
@include hover-focus {
184+
color: inherit;
185+
text-decoration: none;
186+
}
187+
188+
&:focus {
189+
outline: none;
190+
}
191+
}
192+
174193

175194
//
176195
// Code

0 commit comments

Comments
 (0)