0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-29 21:52:22 +01:00

condense that comment, clean up formatting

This commit is contained in:
Mark Otto 2016-01-17 15:50:27 -08:00
parent 8a0b8b6b03
commit 2f4af5c295

View File

@ -19,18 +19,17 @@
content: "#{$breadcrumb-divider}"; content: "#{$breadcrumb-divider}";
} }
// When not using <ul> markup, browsers normally underline the ::before pseudo-element // IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built
// (the separator between the breadcrumbs) when the user hovers over its originating breadcrumb <a> element. // without `<ul>`s. The `::before` pseudo-element generates an element
// In modern browsers, this underline can be suppressed by setting `display:inline-block` on the pseudo-element. // *within* the .breadcrumb-item and thereby inherits the `text-decoration`.
// (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.) //
// IE9-11 suffer from a bug which prevents that solution from working. // To trick IE into suppressing the underline, we give the pseudo-element an
// 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. // underline and then immediately remove it.
// This tricks IE into suppressing the underline.
+ .breadcrumb-item:hover::before { + .breadcrumb-item:hover::before {
text-decoration: underline; // Part 1 of IE9-11 hack to suppress the underline text-decoration: underline;
} }
+ .breadcrumb-item:hover::before { + .breadcrumb-item:hover::before {
text-decoration: none; // Suppress underlining of the separator in IE9-11 (requires an earlier setting of `text-decoration:underline`) text-decoration: none;
} }
&.active { &.active {