Category: Code

Scale_color function

Scale_color function in sass scales the color relative from the starting color to the max number instead of normal linear functions. The code above will output : .content { color:#efefef;} instead of #ffffff like it would with a normal lighten() function. Other arguments it takes in: $red, $green, $blue $saturation $alpha.

Single line if in Sass

Instead of writing an if else statement Sass can handle single line ifs as well. If the crew is less then 4 people the color will go green otherwise red. Note that lists in Sass/Scss starts on 1 and not 0!