1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-29 08:10:47 +02:00

Refactor Breadcrumbs component

Use new `.breadcrumb-item` class instead of child selectors and `li` tag selectors,
so as to no longer require the usage of `<ol>`-based markup.

Rename variables to follow naming conventions:
* $breadcrumb-padding-vertical => $breadcrumb-padding-y
* $breadcrumb-padding-horizontal => $breadcrumb-padding-x

Introduce new variable: $breadcrumb-item-padding

[skip sauce]
This commit is contained in:
Chris Rebert
2015-12-08 02:20:25 -08:00
parent 5173cb1def
commit 76a4c303ee
4 changed files with 33 additions and 19 deletions

View File

@@ -1,23 +1,23 @@
.breadcrumb {
padding: $breadcrumb-padding-vertical $breadcrumb-padding-horizontal;
padding: $breadcrumb-padding-y $breadcrumb-padding-x;
margin-bottom: $spacer-y;
list-style: none;
background-color: $breadcrumb-bg;
@include border-radius($border-radius);
@include clearfix;
}
> li {
float: left;
.breadcrumb-item {
float: left;
+ li::before {
padding-right: .5rem;
padding-left: .5rem;
color: $breadcrumb-divider-color;
content: "#{$breadcrumb-divider}";
}
+ .breadcrumb-item::before {
padding-right: $breadcrumb-item-padding;
padding-left: $breadcrumb-item-padding;
color: $breadcrumb-divider-color;
content: "#{$breadcrumb-divider}";
}
> .active {
&.active {
color: $breadcrumb-active-color;
}
}

View File

@@ -625,8 +625,9 @@ $thumbnail-border-radius: $border-radius !default;
// Breadcrumbs
$breadcrumb-padding-vertical: .75rem !default;
$breadcrumb-padding-horizontal: 1rem !default;
$breadcrumb-padding-y: .75rem !default;
$breadcrumb-padding-x: 1rem !default;
$breadcrumb-item-padding: .5rem !default;
$breadcrumb-bg: $gray-lighter !default;
$breadcrumb-divider-color: $gray-light !default;