Skip to content

Instantly share code, notes, and snippets.

@cahnory
Created December 6, 2015 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cahnory/b2f60796e092df24c640 to your computer and use it in GitHub Desktop.
Save cahnory/b2f60796e092df24c640 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
@mixin short($map, $prefix: '') {
@each $key, $val in $map {
@if 'map' == type-of($val) {
@include short($val, $prefix+$key+'-');
}
@else {
#{$prefix+$key}: $val;
}
}
}
foo {
@include short((
margin: (
left: 4px,
top: 1em
),
font: (
family: (Arial, sans-serif),
size: 1.6em
)
));
}
foo {
margin-left: 4px;
margin-top: 1em;
font-family: Arial, sans-serif;
font-size: 1.6em;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment