0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-20 17:54:23 +01:00

extract .label-variant mix-in

This commit is contained in:
Chris Rebert 2013-07-07 14:26:51 -07:00
parent 95655e7275
commit a7dd1088d2
2 changed files with 16 additions and 28 deletions

View File

@ -30,41 +30,17 @@
// Colors // Colors
// Contextual variations (linked labels get darker on :hover) // Contextual variations (linked labels get darker on :hover)
.label-danger { .label-danger {
background-color: @label-danger-bg; .label-variant(@label-danger-bg);
&[href] {
&:hover,
&:focus {
background-color: darken(@label-danger-bg, 10%);
}
}
} }
.label-success { .label-success {
background-color: @label-success-bg; .label-variant(@label-success-bg);
&[href] {
&:hover,
&:focus {
background-color: darken(@label-success-bg, 10%);
}
}
} }
.label-warning { .label-warning {
background-color: @label-warning-bg; .label-variant(@label-warning-bg);
&[href] {
&:hover,
&:focus {
background-color: darken(@label-warning-bg, 10%);
}
}
} }
.label-info { .label-info {
background-color: @label-info-bg; .label-variant(@label-info-bg);
&[href] {
&:hover,
&:focus {
background-color: darken(@label-info-bg, 10%);
}
}
} }

View File

@ -392,6 +392,18 @@
} }
} }
// Labels
// -------------------------
.label-variant(@color) {
background-color: @color;
&[href] {
&:hover,
&:focus {
background-color: darken(@color, 10%);
}
}
}
// Navbar vertical align // Navbar vertical align
// ------------------------- // -------------------------
// Vertically center elements in the navbar. // Vertically center elements in the navbar.