mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-18 10:52:19 +01:00
Merge pull request #8407 from cvrebert/label-variant-mixin
extract .label-variant mix-in
This commit is contained in:
commit
906d04a4aa
@ -30,41 +30,17 @@
|
||||
// Colors
|
||||
// Contextual variations (linked labels get darker on :hover)
|
||||
.label-danger {
|
||||
background-color: @label-danger-bg;
|
||||
&[href] {
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: darken(@label-danger-bg, 10%);
|
||||
}
|
||||
}
|
||||
.label-variant(@label-danger-bg);
|
||||
}
|
||||
|
||||
.label-success {
|
||||
background-color: @label-success-bg;
|
||||
&[href] {
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: darken(@label-success-bg, 10%);
|
||||
}
|
||||
}
|
||||
.label-variant(@label-success-bg);
|
||||
}
|
||||
|
||||
.label-warning {
|
||||
background-color: @label-warning-bg;
|
||||
&[href] {
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: darken(@label-warning-bg, 10%);
|
||||
}
|
||||
}
|
||||
.label-variant(@label-warning-bg);
|
||||
}
|
||||
|
||||
.label-info {
|
||||
background-color: @label-info-bg;
|
||||
&[href] {
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: darken(@label-info-bg, 10%);
|
||||
}
|
||||
}
|
||||
.label-variant(@label-info-bg);
|
||||
}
|
||||
|
@ -406,6 +406,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Labels
|
||||
// -------------------------
|
||||
.label-variant(@color) {
|
||||
background-color: @color;
|
||||
&[href] {
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: darken(@color, 10%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Navbar vertical align
|
||||
// -------------------------
|
||||
// Vertically center elements in the navbar.
|
||||
|
Loading…
x
Reference in New Issue
Block a user