i was trying to use lighten() and darken() in GSS (i'm gwt 2.8 version and material-design rc4) like so:
@def MAIN_COLOR #64b5f6;
@def LIGHTER_COLOR lighter(MAIN_COLOR, 0.5);
.lighter {
color: LIGHTER_COLOR;
}
but the result is
.lighter {
color: lighter(#64b5f6,0.5)
}
i cannot find any sample of using those functions anywhere.. https://github.com/google/closure-stylesheets
i was expecting that those work like in SASS
$primary-color: #64b5f6;
$darken: darken($primary-color, 7%);
$lighten: lighten($primary-color, 20%);
thanks.
I can't reproduce your exact behaviour, but I have managed to get a working example and found the following:
lighten
I've tried modifying your example as follows and it is working fine:
This is evaluated, using the latest version of Closure Stylesheets (right now, v1.4.0) to become the following:
I expect the number is a percentage lightness increase - that's the method I use in my own color software and is generally what other CSS preprocessor lightening/darkening functions use too - so you might need to play around to get the exact shade you're looking for.
I hope it works for you.