v4: suggestion to introduce a color contrast function
Created by: bassjobsen
for instance: http://compass-style.org/reference/compass/utilities/color/contrast/#function-contrast-color
Useful in among others mixins/background-variants.scss
:
// Contextual backgrounds
// [converter] $parent hack
@mixin bg-variant($parent, $color) {
#{$parent} {
color: contrast-color($color,$gray-dark,$gray-lightest);
background-color: $color;
}
a#{$parent} {
@include hover-focus {
background-color: darken($color, 10%);
}
}
}