sass-site/source/code-snippets/example-each-map.liquid
2023-05-30 17:23:34 -04:00

20 lines
478 B
Plaintext

{% codeExample 'each-map' %}
$icons: ("eye": "\f112", "start": "\f12e", "stop": "\f12f");
@each $name, $glyph in $icons {
.icon-#{$name}:before {
display: inline-block;
font-family: "Icon Font";
content: $glyph;
}
}
===
$icons: ("eye": "\f112", "start": "\f12e", "stop": "\f12f")
@each $name, $glyph in $icons
.icon-#{$name}:before
display: inline-block
font-family: "Icon Font"
content: $glyph
{% endcodeExample %}