Sass Intermediate Concepts Part 2
An introduction to the sass maps, control directives and functions
Control Directives
@if
@for
@each
@while
@if
Example: https://github.com/csswizardry/inuit.css-web-template
@if $use-arrows == true{
.arrow{
position:relative;
}
}
@else {
.other{
position: absolute;
}
}
Functions
@function padding-function($a, $b){
@return $a + $b;
}
.module {
padding: padding-function(10px, 5px);
}