mirror of https://github.com/twbs/bootstrap.git
Drop the recently added .counter class for .badge
This commit is contained in:
parent
d3cc8f79f4
commit
f6ec2c5dac
|
@ -4263,7 +4263,7 @@ a.thumbnail:focus {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.counter {
|
.badge {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
min-width: 10px;
|
min-width: 10px;
|
||||||
padding: 3px 7px;
|
padding: 3px 7px;
|
||||||
|
@ -4278,33 +4278,33 @@ a.thumbnail:focus {
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.counter:empty {
|
.badge:empty {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.counter:hover,
|
a.badge:hover,
|
||||||
a.counter:focus {
|
a.badge:focus {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn .counter {
|
.btn .badge {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -1px;
|
top: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-mini .counter {
|
.btn-mini .badge {
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-list > .active > a > .counter,
|
.nav-list > .active > a > .badge,
|
||||||
.nav-pills > .active > a > .counter {
|
.nav-pills > .active > a > .badge {
|
||||||
color: #428bca;
|
color: #428bca;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-pills > li > a > .counter {
|
.nav-pills > li > a > .badge {
|
||||||
margin-left: 3px;
|
margin-left: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ title: Components
|
||||||
<li><a href="#navbar"><i class="glyphicon glyphicon-chevron-right"></i> Navbar</a></li>
|
<li><a href="#navbar"><i class="glyphicon glyphicon-chevron-right"></i> Navbar</a></li>
|
||||||
<li><a href="#breadcrumbs"><i class="glyphicon glyphicon-chevron-right"></i> Breadcrumbs</a></li>
|
<li><a href="#breadcrumbs"><i class="glyphicon glyphicon-chevron-right"></i> Breadcrumbs</a></li>
|
||||||
<li><a href="#pagination"><i class="glyphicon glyphicon-chevron-right"></i> Pagination</a></li>
|
<li><a href="#pagination"><i class="glyphicon glyphicon-chevron-right"></i> Pagination</a></li>
|
||||||
<li><a href="#counters"><i class="glyphicon glyphicon-chevron-right"></i> Counters</a></li>
|
<li><a href="#badges"><i class="glyphicon glyphicon-chevron-right"></i> Badges</a></li>
|
||||||
<li><a href="#typography"><i class="glyphicon glyphicon-chevron-right"></i> Typography</a></li>
|
<li><a href="#typography"><i class="glyphicon glyphicon-chevron-right"></i> Typography</a></li>
|
||||||
<li><a href="#thumbnails"><i class="glyphicon glyphicon-chevron-right"></i> Thumbnails</a></li>
|
<li><a href="#thumbnails"><i class="glyphicon glyphicon-chevron-right"></i> Thumbnails</a></li>
|
||||||
<li><a href="#alerts"><i class="glyphicon glyphicon-chevron-right"></i> Alerts</a></li>
|
<li><a href="#alerts"><i class="glyphicon glyphicon-chevron-right"></i> Alerts</a></li>
|
||||||
|
@ -1274,44 +1274,44 @@ title: Components
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Counters
|
<!-- Badges
|
||||||
================================================== -->
|
================================================== -->
|
||||||
<section id="counters">
|
<section id="badges">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>Counters</h1>
|
<h1>Badges</h1>
|
||||||
</div>
|
</div>
|
||||||
<p class="lead">Easily highlight new or unread items by adding a <code><span class="counter"></code> to links, Bootstrap navs, and more.</p>
|
<p class="lead">Easily highlight new or unread items by adding a <code><span class="badge"></code> to links, Bootstrap navs, and more.</p>
|
||||||
|
|
||||||
<div class="bs-docs-example">
|
<div class="bs-docs-example">
|
||||||
<a href="#">Inbox <span class="counter">42</span></a>
|
<a href="#">Inbox <span class="badge">42</span></a>
|
||||||
</div>
|
</div>
|
||||||
{% highlight html linenos %}
|
{% highlight html linenos %}
|
||||||
<a href="#">Inbox <span class="counter">42</span></a>
|
<a href="#">Inbox <span class="badge">42</span></a>
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
<h4>Self collapsing</h4>
|
<h4>Self collapsing</h4>
|
||||||
<p>When there are no new or unread items, counters will simply collapse (via CSS's <code>:empty</code> selector) provided no content exists within.</p>
|
<p>When there are no new or unread items, badges will simply collapse (via CSS's <code>:empty</code> selector) provided no content exists within.</p>
|
||||||
|
|
||||||
<h4>Adapts to active nav states</h4>
|
<h4>Adapts to active nav states</h4>
|
||||||
<p>Built-in styles are included for placing counters in active states in pill and list navigations.</p>
|
<p>Built-in styles are included for placing badges in active states in pill and list navigations.</p>
|
||||||
<div class="bs-docs-example">
|
<div class="bs-docs-example">
|
||||||
<ul class="nav nav-pills">
|
<ul class="nav nav-pills">
|
||||||
<li class="active"><a href="#">Home <span class="counter">42</span></a></li>
|
<li class="active"><a href="#">Home <span class="badge">42</span></a></li>
|
||||||
<li><a href="#">Profile</a></li>
|
<li><a href="#">Profile</a></li>
|
||||||
<li><a href="#">Messages <span class="counter">3</span></a></li>
|
<li><a href="#">Messages <span class="badge">3</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
<ul class="nav nav-list" style="max-width: 260px;">
|
<ul class="nav nav-list" style="max-width: 260px;">
|
||||||
<li class="active">
|
<li class="active">
|
||||||
<a href="#">
|
<a href="#">
|
||||||
<span class="counter pull-right">42</span>
|
<span class="badge pull-right">42</span>
|
||||||
Home
|
Home
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#">Profile</a></li>
|
<li><a href="#">Profile</a></li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#">
|
<a href="#">
|
||||||
<span class="counter pull-right">3</span>
|
<span class="badge pull-right">3</span>
|
||||||
Messages
|
Messages
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -1321,7 +1321,7 @@ title: Components
|
||||||
<ul class="nav nav-list">
|
<ul class="nav nav-list">
|
||||||
<li class="active">
|
<li class="active">
|
||||||
<a href="#">
|
<a href="#">
|
||||||
<span class="counter pull-right">42</span>
|
<span class="badge pull-right">42</span>
|
||||||
Home
|
Home
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
//
|
//
|
||||||
// Labels and badges
|
// Badges
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
// Base classes
|
// Base classes
|
||||||
.counter {
|
.badge {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
min-width: 10px;
|
min-width: 10px;
|
||||||
padding: 3px 7px;
|
padding: 3px 7px;
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hover state, but only for links
|
// Hover state, but only for links
|
||||||
a.counter {
|
a.badge {
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus {
|
&:focus {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
@ -36,23 +36,23 @@ a.counter {
|
||||||
|
|
||||||
// Quick fix for labels/badges in buttons
|
// Quick fix for labels/badges in buttons
|
||||||
.btn {
|
.btn {
|
||||||
.counter {
|
.badge {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -1px;
|
top: -1px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.btn-mini {
|
.btn-mini {
|
||||||
.counter {
|
.badge {
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Account for counters in navs
|
// Account for counters in navs
|
||||||
.nav-list > .active > a > .counter,
|
.nav-list > .active > a > .badge,
|
||||||
.nav-pills > .active > a > .counter {
|
.nav-pills > .active > a > .badge {
|
||||||
color: @link-color;
|
color: @link-color;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
.nav-pills > li > a > .counter {
|
.nav-pills > li > a > .badge {
|
||||||
margin-left: 3px;
|
margin-left: 3px;
|
||||||
}
|
}
|
|
@ -49,7 +49,7 @@
|
||||||
@import "alerts.less";
|
@import "alerts.less";
|
||||||
@import "thumbnails.less";
|
@import "thumbnails.less";
|
||||||
@import "media.less";
|
@import "media.less";
|
||||||
@import "counters.less";
|
@import "badges.less";
|
||||||
@import "progress-bars.less";
|
@import "progress-bars.less";
|
||||||
@import "accordion.less";
|
@import "accordion.less";
|
||||||
@import "carousel.less";
|
@import "carousel.less";
|
||||||
|
|
Loading…
Reference in New Issue