File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/* ## Badge
22---------------------------------*/
33$badge-font-size : $text-meta-sm !default ;
4- $badge-padding : 8px !default ;
54$badge-empty-size : 8px !default ;
65
76.badge {
87 display : inline-block ;
9- padding : 0 $badge-padding ;
8+ padding : .25 em .5 em ;
109 font-size : $badge-font-size ;
11- line-height : $line-height-loose ;
10+ line-height : 1 ;
1211 text-align : center ;
1312 white-space : nowrap ;
1413 border-radius : 1993px ;
14+ border : 1px solid transparent ;
1515 vertical-align : middle ;
1616 text-overflow : ellipsis ;
1717 overflow : hidden ;
1818
19- @include badge-variant ($grey-light , $grey-mute );
19+ @include badge-variant ($component-bg , $ grey-thin , $grey-dark );
2020
2121 & :empty {
2222 min-width : auto ;
@@ -27,9 +27,25 @@ $badge-empty-size: 8px !default;
2727}
2828
2929// theme
30+ .badge.badge--black {
31+ @include badge-variant ($black );
32+ }
33+
34+ .badge.badge--dark {
35+ @include badge-variant ($grey-dark );
36+ }
37+
38+ .badge.badge--light {
39+ @include badge-variant ($grey-light );
40+ }
41+
42+ .badge.badge--white {
43+ @include badge-variant ($white );
44+ }
45+
3046@each $name , $color in $theme-colors {
3147 .badge.badge--#{$name } {
32- @include badge-variant ($color )
48+ @include badge-variant ($color );
3349 }
3450}
3551
Original file line number Diff line number Diff line change 22// -----------------------------------------------------------------------------
33@mixin badge-variant (
44 $background ,
5+ $border : $background ,
56 $color : invert-color ($background )
67) {
78 color : $color ;
9+ border-color : $border ;
810 background-color : $background ;
9-
11+
1012 & .badge--link {
1113 cursor : pointer ;
1214 & :hover {
15+ border-color : shade-color ($background , 1 );
1316 background-color : shade-color ($background , 1 );
1417 }
1518 & :active {
19+ border-color : shade-color ($background , 2 );
1620 background-color : shade-color ($background , 2 );
1721 }
1822 }
You can’t perform that action at this time.
0 commit comments