rip badges

This commit is contained in:
Mark Otto 2015-08-05 00:48:42 -07:00
parent 8a7e08ebd2
commit 97bcfb9e7f
8 changed files with 2 additions and 192 deletions

View File

@ -3319,43 +3319,6 @@ a.label:hover {
.label-danger[href]:hover {
background-color: #c9302c; }
.badge {
position: relative;
top: -.1em;
display: inline-block;
padding-right: .6em;
padding-left: .6em;
font-size: .75em;
font-weight: bold;
line-height: 1.5;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: middle;
background-color: #818a91;
border-radius: 2em; }
.badge:empty {
display: none; }
.badge.pull-left,
.badge.pull-right {
top: .2em; }
.list-group-item.active > .badge,
.nav-pills > .active > a > .badge {
color: #0275d8;
background-color: #fff; }
.list-group-item > .badge {
float: right; }
.list-group-item > .badge + .badge {
margin-right: 5px; }
.nav-pills > li > a > .badge {
margin-left: 3px; }
a.badge:focus,
a.badge:hover {
color: #fff;
text-decoration: none;
cursor: pointer; }
.jumbotron {
padding: 2rem 1rem;
margin-bottom: 2rem;

File diff suppressed because one or more lines are too long

View File

@ -3234,43 +3234,6 @@ a.label:hover {
.label-danger[href]:hover {
background-color: #c9302c; }
.badge {
position: relative;
top: -.1em;
display: inline-block;
padding-right: .6em;
padding-left: .6em;
font-size: .75em;
font-weight: bold;
line-height: 1.5;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: middle;
background-color: #818a91;
border-radius: 2em; }
.badge:empty {
display: none; }
.badge.pull-left,
.badge.pull-right {
top: .2em; }
.list-group-item.active > .badge,
.nav-pills > .active > a > .badge {
color: #0275d8;
background-color: #fff; }
.list-group-item > .badge {
float: right; }
.list-group-item > .badge + .badge {
margin-right: 5px; }
.nav-pills > li > a > .badge {
margin-left: 3px; }
a.badge:focus,
a.badge:hover {
color: #fff;
text-decoration: none;
cursor: pointer; }
.jumbotron {
padding: 2rem 1rem;
margin-bottom: 2rem;

File diff suppressed because one or more lines are too long

View File

@ -33,7 +33,6 @@
- title: Input group
- title: Dropdowns
- title: Jumbotron
- title: Badges
- title: Label
- title: Alerts
- title: Card

View File

@ -1,56 +0,0 @@
---
layout: page
title: Badges
---
Badges are indicators for new or unread activity and include support for the active states of our [navigation components](/components/navs/), links, buttons, and more.
## Contents
* Will be replaced with the ToC, excluding the "Contents" header
{:toc}
{% example html %}
<a href="#">Inbox <span class="badge">42</span></a>
{% endexample %}
### Self collapsing
When there are no new or unread items, badges will simply collapse (via CSS's `:empty` selector) provided no content exists within.
### Active nav
Built-in styles are included for placing badges in active states in pill navigations.
{% example html %}
<ul class="nav nav-pills" role="tablist">
<li class="nav-item active" role="presentation">
<a class="nav-link" href="#">Home <span class="badge">42</span></a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link" href="#">Profile</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link" href="#">Messages <span class="badge">3</span></a>
</li>
</ul>
{% endexample %}
### Buttons
Like active nav links, badges in Bootstrap buttons automatically restyle to better blend into the background.
{% example html %}
<button class="btn btn-primary btn-lg" type="button">
Large button <span class="badge">4</span>
</button>
<button class="btn btn-primary" type="button">
Button <span class="badge">4</span>
</button>
<button class="btn btn-primary btn-sm" type="button">
Small button <span class="badge">4</span>
</button>
<button class="btn btn-primary btn-xs" type="button">
Extra small <span class="badge">4</span>
</button>
{% endexample %}

View File

@ -1,56 +0,0 @@
//
// Badges
// --------------------------------------------------
.badge {
position: relative;
top: -.1em;
display: inline-block;
padding-right: .6em;
padding-left: .6em;
font-size: .75em;
font-weight: $badge-font-weight;
line-height: $line-height;
color: $badge-color;
text-align: center;
white-space: nowrap;
vertical-align: middle;
background-color: $badge-bg;
@include border-radius($badge-border-radius);
// Empty badges collapse automatically
&:empty {
display: none;
}
&.pull-left,
&.pull-right {
top: .2em;
}
// Account for badges in navs
.list-group-item.active > &,
.nav-pills > .active > a > & {
color: $badge-active-color;
background-color: $badge-active-bg;
}
.list-group-item > & {
float: right;
}
.list-group-item > & + & {
margin-right: 5px;
}
.nav-pills > li > a > & {
margin-left: 3px;
}
}
// Hover state, but only for links
a.badge {
@include hover-focus {
color: $badge-link-hover-color;
text-decoration: none;
cursor: pointer;
}
}

1
scss/bootstrap.scss vendored
View File

@ -29,7 +29,6 @@
@import "pagination";
@import "pager";
@import "labels";
@import "badge";
@import "jumbotron";
@import "alert";
@import "progress";