Skip to content

Commit

Permalink
add a font color parameter to the badge variant mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
Lausselloic committed Feb 24, 2017
1 parent 626a756 commit ec75282
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
12 changes: 6 additions & 6 deletions scss/_badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,25 @@ a.badge {
// Contextual variations (linked badges get darker on :hover).

.badge-default {
@include badge-variant($badge-default-bg);
@include badge-variant($badge-default-bg,$badge-default-color);
}

.badge-primary {
@include badge-variant($badge-primary-bg);
@include badge-variant($badge-primary-bg,$badge-primary-color);
}

.badge-success {
@include badge-variant($badge-success-bg);
@include badge-variant($badge-success-bg,$badge-success-color);
}

.badge-info {
@include badge-variant($badge-info-bg);
@include badge-variant($badge-info-bg,$badge-info-color);
}

.badge-warning {
@include badge-variant($badge-warning-bg);
@include badge-variant($badge-warning-bg,$badge-warning-color);
}

.badge-danger {
@include badge-variant($badge-danger-bg);
@include badge-variant($badge-danger-bg,$badge-danger-color);
}
6 changes: 6 additions & 0 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -749,11 +749,17 @@ $popover-arrow-outer-color: fade-in($popover-border-color, .05) !defau
// Badges

$badge-default-bg: $gray-light !default;
$badge-default-color: $white !default;
$badge-primary-bg: $brand-primary !default;
$badge-primary-color: $white !default;
$badge-success-bg: $brand-success !default;
$badge-success-color: $white !default;
$badge-info-bg: $brand-info !default;
$badge-info-color: $white !default;
$badge-warning-bg: $brand-warning !default;
$badge-warning-color: $white !default;
$badge-danger-bg: $brand-danger !default;
$badge-danger-color: $white !default;

$badge-color: $white !default;
$badge-link-hover-color: $white !default;
Expand Down
5 changes: 3 additions & 2 deletions scss/mixins/_badge.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Badges

@mixin badge-variant($color) {
background-color: $color;
@mixin badge-variant($bgcolor,$color) {
background-color: $bgcolor;
color: $color;

&[href] {
@include hover-focus {
Expand Down

0 comments on commit ec75282

Please sign in to comment.