Maps & @each directive
Description
Maps represent an association between keys and values, where keys are used to look up values. They make it easy to collect values into named groups and access those groups dynamically. They have no direct parallel in CSS, although they’re syntactically similar to media query expressions.
Declaration example:
@each
directive
@each
directiveThe @each
directive usually has the form @each $var in <list or map>
but it can also use multiple variables like @each $var1, $var2, ... in <list>
.
Usage example:
Is compiled to:
Read More:
Last updated