Created
October 1, 2014 19:18
-
-
Save wingrunr21/fd039ded81af117adf49 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.4) | |
// Compass (v1.0.1) | |
// ---- | |
@mixin desc($name) { | |
@at-root &-#{$name} { @content; } | |
} | |
@mixin tdesc($name, $parent) { | |
@at-root #{$name} #{$parent} { @content; } | |
} | |
@mixin mod($name) { | |
@at-root &--#{$name} { @content; } | |
} | |
@function with-parent($name, $parent) { | |
@return #{$parent}-#{$name}; | |
} | |
.Component { | |
height: 10rem; | |
$parent: &; | |
// .Component-header | |
@include desc(header) { | |
height: 20rem; | |
} | |
// .Component--small | |
@include mod(small) { | |
height: 5rem; | |
@include tdesc(&, with-parent(header, $parent)) { | |
height: 10rem; | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.Component { | |
height: 10rem; | |
} | |
.Component-header { | |
height: 20rem; | |
} | |
.Component--small { | |
height: 5rem; | |
} | |
.Component--small .Component-header { | |
height: 10rem; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment