- Source:
Methods
attributes-for-breakpoints($attributes, $factoropt)
Renders attribute values for given attributes for defined breakpoints.
Definitions will be rendered together if possible, minimizing the amount of media queries.
However, each call of this mixin will, most likely, render multiple media queries, so keep a close eye
on your media query structure to avoid unnecessarily doubled definitions and keep media queries to a minimum.
If in doubt, it might be a better idea to write the queries manually, perhaps rather using map-get
or
breakpoint-value
to automatically pull values from breakpoint value maps.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
$attributes |
Map | keys are attribute names, while values are either plain values or maps with breakpoint name keys, providing different values per breakpoint |
||
$factor |
Number |
<optional> |
null | if a float factor is provided all values will be multiplied with this factor |
- Source:
- See:
Example
@include attributes-for-breakpoints(
(
'font-size' : 12px,
'line-height' : (
'small' : 1,
'large' : 1.25
),
'margin-top' : (
'small' : 10px,
'medium' : 20px
)
),
2.0
);