0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-19 16:54:24 +01:00

Use -* vars for .bg-* and .text-* utilities

- Simplifies variables usage
- Makes components and brand variable usage more consistent (dark bg and white text throughout instead of some mixed light and dark bgs)
- Very likely means lower contrast and thus no more AA compliance (we'll want to fix that eventually obviously)
This commit is contained in:
Mark Otto 2015-08-13 23:47:47 -07:00
parent b2f9fe4a3e
commit 6a75d07e0c
2 changed files with 9 additions and 14 deletions

View File

@ -107,13 +107,13 @@
@include text-emphasis-variant('.text-primary', $brand-primary);
@include text-emphasis-variant('.text-success', $state-success-text);
@include text-emphasis-variant('.text-success', $brand-success);
@include text-emphasis-variant('.text-info', $state-info-text);
@include text-emphasis-variant('.text-info', $brand-info);
@include text-emphasis-variant('.text-warning', $state-warning-text);
@include text-emphasis-variant('.text-warning', $brand-warning);
@include text-emphasis-variant('.text-danger', $state-danger-text);
@include text-emphasis-variant('.text-danger', $brand-danger);
// Contextual backgrounds
@ -127,18 +127,12 @@
background-color: $gray-dark;
}
.bg-primary {
// Given the contrast here, this is the only class to have its color inverted
// automatically.
color: #fff;
}
@include bg-variant('.bg-primary', $brand-primary);
@include bg-variant('.bg-success', $state-success-bg);
@include bg-variant('.bg-success', $brand-success);
@include bg-variant('.bg-info', $state-info-bg);
@include bg-variant('.bg-info', $brand-info);
@include bg-variant('.bg-warning', $state-warning-bg);
@include bg-variant('.bg-warning', $brand-warning);
@include bg-variant('.bg-danger', $state-danger-bg);
@include bg-variant('.bg-danger', $brand-danger);

View File

@ -3,6 +3,7 @@
// [converter] $parent hack
@mixin bg-variant($parent, $color) {
#{$parent} {
color: #fff;
background-color: $color;
}
a#{$parent} {