Skip to content

Instantly share code, notes, and snippets.

@andreasisaak
Last active August 29, 2015 14:07
Show Gist options
  • Save andreasisaak/e9976ec3b8bd1a045e35 to your computer and use it in GitHub Desktop.
Save andreasisaak/e9976ec3b8bd1a045e35 to your computer and use it in GitHub Desktop.
Different syntax for SassScript Maps in libsass and rubysass
// rubysass
$icons: (
pencil-square-o : $fa-var-pencil-square-o,
user : $fa-var-user,
key : $fa-var-key,
);
@each $icon-value, $icon-key in $icons {
li.#{$icon-key} a:before {
content: $icon-value;
}
}
// libsass
$icons: (
pencil-square-o $fa-var-pencil-square-o,
user $fa-var-user,
key $fa-var-key
);
@each $icon-key in map-keys($icons) {
$icon-value: map-get($icons, $icon-key);
li.#{$icon-key} a:before {
content: $icon-value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment