Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve badges mixinability #12969

Merged
merged 1 commit into from
Mar 7, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions less/badges.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// --------------------------------------------------


// Base classes
// Base class
.badge {
display: inline-block;
min-width: 10px;
Expand Down Expand Up @@ -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;
}
}
2 changes: 1 addition & 1 deletion less/labels.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
border-radius: .25em;

// Add hover effects, but only for links
&[href] {
a& {
&:hover,
&:focus {
color: @label-link-hover-color;
Expand Down