I read in the documentation of Stylus CSS preprocessor language, that the color function are unit-sensitive. For example:
Darken the given color by amount.This function is unit-sensitive, for
example supporting percentages as shown below.
// => #551010
// => #961c1c
Yeah, that's far from intuitive, but if you'd look into the source then you'll find out:
darken bif calls the
adjust bif like this:
adjust(color, 'lightness', - amount)
adjust bif have different behaviour for percents and other units:
30it would change the color's lightness by reducing it by given amount from the color's lightness.