mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-29 21:52:22 +01:00
Merge pull request #12969 from ZDroid/badge-mixin
Improve badges mixinability
This commit is contained in:
commit
538b3ca06f
@ -3,7 +3,7 @@
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
// Base classes
|
// Base class
|
||||||
.badge {
|
.badge {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
min-width: 10px;
|
min-width: 10px;
|
||||||
@ -32,24 +32,24 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
padding: 1px 5px;
|
padding: 1px 5px;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Hover state, but only for links
|
// Hover state, but only for links
|
||||||
a.badge {
|
a& {
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus {
|
&:focus {
|
||||||
color: @badge-link-hover-color;
|
color: @badge-link-hover-color;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
cursor: pointer;
|
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;
|
|
||||||
}
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
border-radius: .25em;
|
border-radius: .25em;
|
||||||
|
|
||||||
// Add hover effects, but only for links
|
// Add hover effects, but only for links
|
||||||
&[href] {
|
a& {
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus {
|
&:focus {
|
||||||
color: @label-link-hover-color;
|
color: @label-link-hover-color;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user