Skip to content

Instantly share code, notes, and snippets.

@scottdavis
Created October 15, 2014 18:52
Show Gist options
  • Select an option

  • Save scottdavis/2a63777caabb49afceb4 to your computer and use it in GitHub Desktop.

Select an option

Save scottdavis/2a63777caabb49afceb4 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.5)
// Compass (v1.0.1)
// Susy (v2.1.3)
// ----
@import "compass";
@import "susy";
@mixin render(
$css
) {
@each $key, $value in $css {
@if type-of($value) == map {
// Recursive...
#{$key} { @include render($value); }
} @else if $key == 'extend' {
@extend #{$value};
} @else {
#{$key}: $value;
}
}
}
.line-height {
line-height:16px;
}
$header-styles : (
header:(color:red, float:left,
nav:(
color: blue,
float:left,
"&:hover":(color:red)
),
"&:hover":(color: green),
"extend":".line-height",
));
@include render($header-styles);
.line-height, header {
line-height: 16px;
}
header {
color: red;
float: left;
}
header nav {
color: blue;
float: left;
}
header nav:hover {
color: red;
}
header:hover {
color: green;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment