Skip to content

Commit

Permalink
Merge pull request #13 from bassjobsen/patch-2
Browse files Browse the repository at this point in the history
luma correction for Less 1.7
  • Loading branch information
rriepe committed Oct 1, 2014
2 parents dc5a098 + 52a0e4b commit 57a387c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scheme.less
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
///////////////////////////

@sat:saturation(@seed-color);
@luma:luma(@seed-color);
@luma:luminance(@seed-color);
@lit:lightness(@seed-color);
@tone:desaturate(@seed-color,100%);

Expand Down Expand Up @@ -113,12 +113,12 @@

// contrasts text against a given background color

.contrast (@color) when (luma(@color) >= @luma-upper-break) {
.contrast (@color) when (luminance(@color) >= @luma-upper-break) {
//darker text for lighter backgrounds
color:average(darken(@color,30%),#222);
}

.contrast (@color) when (luma(@color) < @luma-upper-break) {
.contrast (@color) when (luminance(@color) < @luma-upper-break) {
//white text for everything else
color:#ffffff;
}
Expand Down

0 comments on commit 57a387c

Please sign in to comment.