Skip to content

Commit

Permalink
feat(badge): add sizes variants to badges and include a white info ve…
Browse files Browse the repository at this point in the history
…rsion when badge is large enough
  • Loading branch information
ffoodd committed Aug 30, 2019
1 parent f20de5b commit 859cc5e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
14 changes: 14 additions & 0 deletions scss/_badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@
@each $color, $value in $theme-colors {
.badge-#{$color} {
@include badge-variant($value);

@if $color == "info" {
&.badge-lg {
color: $white;
}
}
}
}

Expand All @@ -64,3 +70,11 @@
}
}
}

.badge-xlg {
@include font-size($badge-font-size-xlg);
}

.badge-lg {
@include font-size($badge-font-size-lg);
}
1 change: 0 additions & 1 deletion scss/_o-navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
.badge {
left: 50%;
z-index: 1;
font-size: .75rem;
}
}

Expand Down
4 changes: 3 additions & 1 deletion scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,9 @@ $toast-header-border-color: rgba(0, 0, 0, .05) !default;

// Badges

$badge-font-size: .875rem !default;
$badge-font-size: $font-size-sm !default;
$badge-font-size-lg: $font-size-base !default;
$badge-font-size-xlg: $font-size-lg !default;
$badge-font-weight: $font-weight-bold !default;
$badge-padding-y: .1875rem !default;
$badge-padding-x: .625rem !default;
Expand Down

0 comments on commit 859cc5e

Please sign in to comment.