0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-17 09:52:29 +01:00

refactoring: add & use .bg-variant() mixin

This commit is contained in:
Chris Rebert 2014-01-15 18:21:56 -08:00
parent 0ef8d1bad4
commit b121207e10
2 changed files with 14 additions and 20 deletions

View File

@ -577,6 +577,15 @@
}
}
// Contextual backgrounds
// -------------------------
.bg-variant(@color) {
background-color: @color;
a&:hover {
background-color: darken(@color, 10%);
}
}
// Navbar vertical align
// -------------------------
// Vertically center elements in the navbar.

View File

@ -129,34 +129,19 @@ cite { font-style: normal; }
// Given the contrast here, this is the only class to have its color inverted
// automatically.
color: #fff;
background-color: @brand-primary;
a&:hover {
background-color: darken(@brand-primary, 10%);
}
.bg-variant(@brand-primary);
}
.bg-success {
background-color: @state-success-bg;
a&:hover {
background-color: darken(@state-success-bg, 10%);
}
.bg-variant(@state-success-bg);
}
.bg-info {
background-color: @state-info-bg;
a&:hover {
background-color: darken(@state-info-bg, 10%);
}
.bg-variant(@state-info-bg);
}
.bg-warning {
background-color: @state-warning-bg;
a&:hover {
background-color: darken(@state-warning-bg, 10%);
}
.bg-variant(@state-warning-bg);
}
.bg-danger {
background-color: @state-danger-bg;
a&:hover {
background-color: darken(@state-danger-bg, 10%);
}
.bg-variant(@state-danger-bg);
}