spaCy/website/assets/css/_utils/_functions.sass
2016-04-01 01:24:48 +11:00

24 lines
786 B
Sass

// Functions
// ============================================================================
// Helper to round to decimals (used for rem units)
// $calculation - value or performed calculation
@function round-dec($calculation)
@return round($calculation * 10) / 10
// Helper for colors (refers to $colors in colors)
// $color-name - name of predefined color (i.e. blue)
// $color-variant - predefined hue (default: base)
@function color($color-name, $color-variant: base)
@return map-get(map-get($colors, $color-name), $color-variant)
// Helper for patterns, returns pattern image of color
// $color-name - name of predefined color (i.e. blue)
@function pattern($color-name)
@return url('../img/pattern_#{$color-name}.jpg') center center repeat scroll