Commit f6ec2c5d authored by Mark Otto's avatar Mark Otto
Browse files

Drop the recently added .counter class for .badge

parent d3cc8f79
17 merge requests!7033Fix backdrop undefined bug in modal,!8635ignore Gruntfile.js in jekyll,!8339Fix broken links to navbar component in docs examples,!7329Fix for issue #7328,!7219Fix for mini typo mistake in css.html,!7674Clear float on all when navbar is collapsed - v3,!7344Fixed .spanX selector (*= instead of ^=),!7346Fix compilation error,!7775added some tests for tooltip title setter,!8157Close Me: Docs "Customize and Download" button fix,!7509Proposed fix for allowing Collapse events ('show'/'hide') to be cancelled,!7964commit fixes #7792,!8656Added rel="stylesheet" to CDN-Examples,!8527Inner properties move 1,!8245Interactive color picker - Closed: request against wrong branch,!7865Patch 2,!7651Drop the sizzle dependency to allow smaller builds targeting mobile devices
Showing with 32 additions and 32 deletions
+32 -32
......@@ -4263,7 +4263,7 @@ a.thumbnail:focus {
list-style: none;
}
.counter {
.badge {
display: inline-block;
min-width: 10px;
padding: 3px 7px;
......@@ -4278,33 +4278,33 @@ a.thumbnail:focus {
border-radius: 10px;
}
.counter:empty {
.badge:empty {
display: none;
}
a.counter:hover,
a.counter:focus {
a.badge:hover,
a.badge:focus {
color: #fff;
text-decoration: none;
cursor: pointer;
}
.btn .counter {
.btn .badge {
position: relative;
top: -1px;
}
.btn-mini .counter {
.btn-mini .badge {
top: 0;
}
.nav-list > .active > a > .counter,
.nav-pills > .active > a > .counter {
.nav-list > .active > a > .badge,
.nav-pills > .active > a > .badge {
color: #428bca;
background-color: #fff;
}
.nav-pills > li > a > .counter {
.nav-pills > li > a > .badge {
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="#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="#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="#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>
......@@ -1274,44 +1274,44 @@ title: Components
<!-- Counters
<!-- Badges
================================================== -->
<section id="counters">
<section id="badges">
<div class="page-header">
<h1>Counters</h1>
<h1>Badges</h1>
</div>
<p class="lead">Easily highlight new or unread items by adding a <code>&lt;span class="counter"&gt;</code> to links, Bootstrap navs, and more.</p>
<p class="lead">Easily highlight new or unread items by adding a <code>&lt;span class="badge"&gt;</code> to links, Bootstrap navs, and more.</p>
<div class="bs-docs-example">
<a href="#">Inbox <span class="counter">42</span></a>
<a href="#">Inbox <span class="badge">42</span></a>
</div>
{% highlight html linenos %}
<a href="#">Inbox <span class="counter">42</span></a>
<a href="#">Inbox <span class="badge">42</span></a>
{% endhighlight %}
<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>
<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">
<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="#">Messages <span class="counter">3</span></a></li>
<li><a href="#">Messages <span class="badge">3</span></a></li>
</ul>
<br>
<ul class="nav nav-list" style="max-width: 260px;">
<li class="active">
<a href="#">
<span class="counter pull-right">42</span>
<span class="badge pull-right">42</span>
Home
</a>
</li>
<li><a href="#">Profile</a></li>
<li>
<a href="#">
<span class="counter pull-right">3</span>
<span class="badge pull-right">3</span>
Messages
</a>
</li>
......@@ -1321,7 +1321,7 @@ title: Components
<ul class="nav nav-list">
<li class="active">
<a href="#">
<span class="counter pull-right">42</span>
<span class="badge pull-right">42</span>
Home
</a>
</li>
......
//
// Labels and badges
// Badges
// --------------------------------------------------
// Base classes
.counter {
.badge {
display: inline-block;
min-width: 10px;
padding: 3px 7px;
......@@ -25,7 +25,7 @@
}
// Hover state, but only for links
a.counter {
a.badge {
&:hover,
&:focus {
color: #fff;
......@@ -36,23 +36,23 @@ a.counter {
// Quick fix for labels/badges in buttons
.btn {
.counter {
.badge {
position: relative;
top: -1px;
}
}
.btn-mini {
.counter {
.badge {
top: 0;
}
}
// Account for counters in navs
.nav-list > .active > a > .counter,
.nav-pills > .active > a > .counter {
.nav-list > .active > a > .badge,
.nav-pills > .active > a > .badge {
color: @link-color;
background-color: #fff;
}
.nav-pills > li > a > .counter {
.nav-pills > li > a > .badge {
margin-left: 3px;
}
......@@ -49,7 +49,7 @@
@import "alerts.less";
@import "thumbnails.less";
@import "media.less";
@import "counters.less";
@import "badges.less";
@import "progress-bars.less";
@import "accordion.less";
@import "carousel.less";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment