0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-17 09:52:29 +01:00

Improve badges mixinability

This commit is contained in:
Zlatan Vasović 2014-03-07 18:54:53 +01:00
parent b9a0d1e4cd
commit 0f3b176a76
2 changed files with 20 additions and 20 deletions

View File

@ -3,7 +3,7 @@
// --------------------------------------------------
// Base classes
// Base class
.badge {
display: inline-block;
min-width: 10px;
@ -32,24 +32,24 @@
top: 0;
padding: 1px 5px;
}
}
// Hover state, but only for links
a.badge {
&:hover,
&:focus {
color: @badge-link-hover-color;
text-decoration: none;
cursor: pointer;
// Hover state, but only for links
a& {
&:hover,
&:focus {
color: @badge-link-hover-color;
text-decoration: none;
cursor: pointer;
}
}
// Account for badges in navs
a.list-group-item.active > &,
.nav-pills > .active > a > & {
color: @badge-active-color;
background-color: @badge-active-bg;
}
.nav-pills > li > a > & {
margin-left: 3px;
}
}
// Account for counters in navs
a.list-group-item.active > .badge,
.nav-pills > .active > a > .badge {
color: @badge-active-color;
background-color: @badge-active-bg;
}
.nav-pills > li > a > .badge {
margin-left: 3px;
}

View File

@ -15,7 +15,7 @@
border-radius: .25em;
// Add hover effects, but only for links
&[href] {
a& {
&:hover,
&:focus {
color: @label-link-hover-color;