Skip to content

Commit

Permalink
Fix issue with color function scope
Browse files Browse the repository at this point in the history
  • Loading branch information
Reda Lemeden committed Mar 27, 2014
1 parent 909fc28 commit a11567c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dist/functions/_color-lightness.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
// More details here http://robots.thoughtbot.com/closer-look-color-lightness

@function is-light($hex-color) {
$red: red(rgba($hex-color, 1.0));
$green: green(rgba($hex-color, 1.0));
$blue: blue(rgba($hex-color, 1.0));
$-local-red: red(rgba($hex-color, 1.0));
$-local-green: green(rgba($hex-color, 1.0));
$-local-blue: blue(rgba($hex-color, 1.0));

$lightness: ($red * 0.2126 + $green * 0.7152 + $blue * 0.0722) / 255;
$-local-lightness: ($-local-red * 0.2126 + $-local-green * 0.7152 + $-local-blue * 0.0722) / 255;

@return $lightness > .6;
@return $-local-lightness > .6;
}

0 comments on commit a11567c

Please sign in to comment.