modified the yiq to to an actual function
function only returns a value, not the attribute itself updated every use of the former mixin to use the new function
This commit is contained in:
parent
cf004433e0
commit
cc092272ee
4 changed files with 10 additions and 10 deletions
|
|
@ -49,7 +49,7 @@
|
|||
}
|
||||
|
||||
// Color contrast
|
||||
@mixin color-yiq($color) {
|
||||
@function color-yiq($color) {
|
||||
$r: red($color);
|
||||
$g: green($color);
|
||||
$b: blue($color);
|
||||
|
|
@ -57,9 +57,9 @@
|
|||
$yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
|
||||
|
||||
@if ($yiq >= 150) {
|
||||
color: #111;
|
||||
@return #111;
|
||||
} @else {
|
||||
color: #fff;
|
||||
@return #fff;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue