Answer the question
In order to leave comments, you need to log in
How do you use Sass Maps?
Do not confuse with source-maps. As you use, preferably with code examples. I can google, I'm not very friendly with English.
Answer the question
In order to leave comments, you need to log in
Sass Maps is great for declaring scope on variables like this:
$colors: (
sexy: #FA6ACC,
glamour: #F02A52,
sky: #09A6E4
);
.element {
background-color: map-get($colors, sky);
}
$icons: (
glass: "\f000",
music: "\f001",
search: "\f002",
envelope: "\f003",
heart: "\f004"
);
@each $name, $icon in $icons {
.fa-#{$name}:before {
content: $icon;
}
}
With sass maps, the possibilities are unlimited, there is a huge field for experimentation. Try it, keep it up!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question