• 2.5.0

Functions

Notice: most of the functions use values defined in the settings file by default. The exact outputed value may differ from the examples below.

rem($value, $base: $base-font-size)

Calculate the corresponding rem value proportionnaly to the $base-font-size or the value of your choice when specified as the second parameter.

font-size: rem(24px); //-> font-size: 1.5rem;
font-size: rem(30px, 15px); //-> font-size: 2rem;

ratio($value, $ratio: $ratio)

Divide the given value by the $ratio rounded down. Useful to create “visually equal” spacings as mathematically equal spacings never “visually” look equal around text.

padding: ratio(24px) 24px; //-> padding: 14px 24px;

parse-int($value)

Return the value without unit.

parse-int(10px) //-> 10

flip($ltr-value, $rtl-value)

Switch the two parameters depending on the $ltr setting.

flip(left, right) //-> "right" if $ltr is true, otherwise "left"