Closed khkmzynv closed 7 years ago
Currently there is a bit of a divide on this between preprocessors
SASS behavior: http://codepen.io/notoriousb1t/pen/de7584488ad5c7c458765bf5eaa056ec
LESS behavior: http://codepen.io/notoriousb1t/pen/d829544e445400b3becd5ffff0c78c04
Stylus behavior: http://codepen.io/notoriousb1t/pen/6d0442e17e4bb1d6f657cf7c766746de
I think that overloading darken would be the best way to incorporate both relative (used by Stylus) and absolute (used by SASS and LESS)
public darken(percent: string | number, relative?: boolean): ColorHelper
I changed the file to use an overload. I think this will provide a way to use either methodology.
Great! Thanks @notoriousb1t :)
Now the percentage is calculated from the original color value, rather than the maximal value.