Skip to content

Instantly share code, notes, and snippets.

@LukyVj
Last active August 29, 2015 14:23
Show Gist options
  • Save LukyVj/70bb9cb988f0acfd2a8c to your computer and use it in GitHub Desktop.
Save LukyVj/70bb9cb988f0acfd2a8c to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
// SASS Maps
$map: (
1: 'red',
2: 'blue',
3: 'green'
);
// You can see it's a basic <key:value> syntax
// You can use it like this
// Iterate on key and value in map
@each $key, $value in $map{
.class-#{$key}{
color: #{$value}; // I remove the quotes with #{}
}
}
.class-1 {
color: red;
}
.class-2 {
color: blue;
}
.class-3 {
color: green;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment