mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-20 20:00:36 +03:00
refactoring: add & use .bg-variant() mixin
This commit is contained in:
@@ -577,6 +577,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Contextual backgrounds
|
||||||
|
// -------------------------
|
||||||
|
.bg-variant(@color) {
|
||||||
|
background-color: @color;
|
||||||
|
a&:hover {
|
||||||
|
background-color: darken(@color, 10%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Navbar vertical align
|
// Navbar vertical align
|
||||||
// -------------------------
|
// -------------------------
|
||||||
// Vertically center elements in the navbar.
|
// Vertically center elements in the navbar.
|
||||||
|
|||||||
+5
-20
@@ -129,34 +129,19 @@ cite { font-style: normal; }
|
|||||||
// Given the contrast here, this is the only class to have its color inverted
|
// Given the contrast here, this is the only class to have its color inverted
|
||||||
// automatically.
|
// automatically.
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background-color: @brand-primary;
|
.bg-variant(@brand-primary);
|
||||||
a&:hover {
|
|
||||||
background-color: darken(@brand-primary, 10%);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.bg-success {
|
.bg-success {
|
||||||
background-color: @state-success-bg;
|
.bg-variant(@state-success-bg);
|
||||||
a&:hover {
|
|
||||||
background-color: darken(@state-success-bg, 10%);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.bg-info {
|
.bg-info {
|
||||||
background-color: @state-info-bg;
|
.bg-variant(@state-info-bg);
|
||||||
a&:hover {
|
|
||||||
background-color: darken(@state-info-bg, 10%);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.bg-warning {
|
.bg-warning {
|
||||||
background-color: @state-warning-bg;
|
.bg-variant(@state-warning-bg);
|
||||||
a&:hover {
|
|
||||||
background-color: darken(@state-warning-bg, 10%);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.bg-danger {
|
.bg-danger {
|
||||||
background-color: @state-danger-bg;
|
.bg-variant(@state-danger-bg);
|
||||||
a&:hover {
|
|
||||||
background-color: darken(@state-danger-bg, 10%);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user