- Source:
Methods
spacing-based-attributes($attributes, $factoropt)
Define (an) attribute(s) based on breakpoint-dependent spacing values.
This will render the given attributes with the corresponding spacing values for each defined breakpoint
in compiled media queries. Since this will result in many media queries being rendered, make sure before,
that there aren't many other media queries also needed to complete your definition. In that case, it might be
better and more performant to rather write the queries manually and get the spacing values via []
or
spacing-value
.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
$attributes |
Map | keys are attribute names, while values are spacing sizes |
||
$factor |
Number |
<optional> |
null | if a float factor is provided all values will be multiplied with this factor |
- Source:
- See:
Throws:
error if size is unknown
Example
@include spacing-based-attributes(
(
'padding-top' : 'sm',
'padding-right' : 'md',
'padding-bottom' : 'sm'
'padding-left' : 'md'
'margin-top' : 'l',
'margin-bottom' : 'xl'
),
2.0
);