Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.