You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scss/_breadcrumb.scss
+16-1Lines changed: 16 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,14 +10,29 @@
10
10
.breadcrumb-item {
11
11
float: left;
12
12
13
+
// The separator between breadcrumbs (by default, a forward-slash: "/")
13
14
+ .breadcrumb-item::before {
14
-
display: inline-block;
15
+
display: inline-block;// Suppress underlining of the separator in modern browsers
15
16
padding-right: $breadcrumb-item-padding;
16
17
padding-left: $breadcrumb-item-padding;
17
18
color: $breadcrumb-divider-color;
18
19
content: "#{$breadcrumb-divider}";
19
20
}
20
21
22
+
// When not using <ul> markup, browsers normally underline the ::before pseudo-element
23
+
// (the separator between the breadcrumbs) when the user hovers over its originating breadcrumb <a> element.
24
+
// In modern browsers, this underline can be suppressed by setting `display:inline-block` on the pseudo-element.
25
+
// (Why doesn't simply setting `text-decoration:none` on the pseudo-element work? Because that's how text-decoration propagation has been spec'd in CSS.)
26
+
// IE9-11 suffer from a bug which prevents that solution from working.
27
+
// For them, we apply a hack where we first set `text-decoration:underline` and then later set `text-decoration:none`, both on the pseudo-element.
28
+
// This tricks IE into suppressing the underline.
29
+
+ .breadcrumb-item:hover::before {
30
+
text-decoration: underline; // Part 1 of IE9-11 hack to suppress the underline
31
+
}
32
+
+ .breadcrumb-item:hover::before {
33
+
text-decoration: none; // Suppress underlining of the separator in IE9-11 (requires an earlier setting of `text-decoration:underline`)
0 commit comments