mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-17 11:00:56 +02:00
Merge pull request #12248 from twbs/bg-variant
refactoring: add & use .bg-variant() mixin
This commit is contained in:
2
dist/css/bootstrap-theme.css.map
vendored
2
dist/css/bootstrap-theme.css.map
vendored
File diff suppressed because one or more lines are too long
10
dist/css/bootstrap.css
vendored
10
dist/css/bootstrap.css
vendored
@@ -492,31 +492,31 @@ cite {
|
|||||||
.text-primary {
|
.text-primary {
|
||||||
color: #428bca;
|
color: #428bca;
|
||||||
}
|
}
|
||||||
.text-primary:hover {
|
a.text-primary:hover {
|
||||||
color: #3071a9;
|
color: #3071a9;
|
||||||
}
|
}
|
||||||
.text-success {
|
.text-success {
|
||||||
color: #3c763d;
|
color: #3c763d;
|
||||||
}
|
}
|
||||||
.text-success:hover {
|
a.text-success:hover {
|
||||||
color: #2b542c;
|
color: #2b542c;
|
||||||
}
|
}
|
||||||
.text-info {
|
.text-info {
|
||||||
color: #31708f;
|
color: #31708f;
|
||||||
}
|
}
|
||||||
.text-info:hover {
|
a.text-info:hover {
|
||||||
color: #245269;
|
color: #245269;
|
||||||
}
|
}
|
||||||
.text-warning {
|
.text-warning {
|
||||||
color: #8a6d3b;
|
color: #8a6d3b;
|
||||||
}
|
}
|
||||||
.text-warning:hover {
|
a.text-warning:hover {
|
||||||
color: #66512c;
|
color: #66512c;
|
||||||
}
|
}
|
||||||
.text-danger {
|
.text-danger {
|
||||||
color: #a94442;
|
color: #a94442;
|
||||||
}
|
}
|
||||||
.text-danger:hover {
|
a.text-danger:hover {
|
||||||
color: #843534;
|
color: #843534;
|
||||||
}
|
}
|
||||||
.bg-primary {
|
.bg-primary {
|
||||||
|
2
dist/css/bootstrap.css.map
vendored
2
dist/css/bootstrap.css.map
vendored
File diff suppressed because one or more lines are too long
2
dist/css/bootstrap.min.css
vendored
2
dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
2
docs/dist/css/bootstrap-theme.css.map
vendored
2
docs/dist/css/bootstrap-theme.css.map
vendored
File diff suppressed because one or more lines are too long
2
docs/dist/css/bootstrap.css.map
vendored
2
docs/dist/css/bootstrap.css.map
vendored
File diff suppressed because one or more lines are too long
2
docs/dist/css/bootstrap.min.css
vendored
2
docs/dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -577,11 +577,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Contextual backgrounds
|
||||||
|
// -------------------------
|
||||||
|
.bg-variant(@color) {
|
||||||
|
background-color: @color;
|
||||||
|
a&:hover {
|
||||||
|
background-color: darken(@color, 10%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Typography
|
// Typography
|
||||||
// -------------------------
|
// -------------------------
|
||||||
.text-emphasis-variant(@color) {
|
.text-emphasis-variant(@color) {
|
||||||
color: @color;
|
color: @color;
|
||||||
&:hover {
|
a&:hover {
|
||||||
color: darken(@color, 10%);
|
color: darken(@color, 10%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -114,34 +114,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