mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
feature/yiq function, add parameters, with default values. (#26917)
This commit is contained in:
parent
e2014e8ed7
commit
3075432584
@ -49,7 +49,7 @@
|
||||
}
|
||||
|
||||
// Color contrast
|
||||
@function color-yiq($color) {
|
||||
@function color-yiq($color, $dark: $yiq-text-dark, $light: $yiq-text-light) {
|
||||
$r: red($color);
|
||||
$g: green($color);
|
||||
$b: blue($color);
|
||||
@ -57,9 +57,9 @@
|
||||
$yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
|
||||
|
||||
@if ($yiq >= $yiq-contrasted-threshold) {
|
||||
@return $yiq-text-dark;
|
||||
@return $dark;
|
||||
} @else {
|
||||
@return $yiq-text-light;
|
||||
@return $light;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user