Category: Compass

Contrast-color function

This codeblock creates a function called button-text that make use of the built-in function contrast-color in Compass. The function takes in 4 arguments in this order: Color, dark color, light color, threshold %. So depending on what color gets written and the threshold, it will either be the dark or the light one that returns..

Use stretch with compass

By importing compass/layout in order to get more mixins and functions, one of them are Stretch which stretches the element to instead of writing a absolute position and top,right,bottom,left. without any arguments the function default values are 0.