diff options
| author | Zlatan Vasović <[email protected]> | 2014-03-07 18:54:53 +0100 |
|---|---|---|
| committer | Zlatan Vasović <[email protected]> | 2014-03-07 18:54:53 +0100 |
| commit | 0f3b176a763abdaddfe3f538cc386b2b15456d0d (patch) | |
| tree | 2adb3ba371fc074cc60eccfa6c819661007237aa | |
| parent | b9a0d1e4cd17b26d93fc314cff755a1a459c5f7b (diff) | |
| download | bootstrap-0f3b176a763abdaddfe3f538cc386b2b15456d0d.tar.xz bootstrap-0f3b176a763abdaddfe3f538cc386b2b15456d0d.zip | |
Improve badges mixinability
| -rw-r--r-- | less/badges.less | 36 | ||||
| -rw-r--r-- | less/labels.less | 2 |
2 files changed, 19 insertions, 19 deletions
diff --git a/less/badges.less b/less/badges.less index 56828cab7..20624f30d 100644 --- a/less/badges.less +++ b/less/badges.less @@ -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 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; + // 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; + } } diff --git a/less/labels.less b/less/labels.less index 5db1ed12c..9a5a27006 100644 --- a/less/labels.less +++ b/less/labels.less @@ -15,7 +15,7 @@ border-radius: .25em; // Add hover effects, but only for links - &[href] { + a& { &:hover, &:focus { color: @label-link-hover-color; |
