Created
July 24, 2014 19:21
-
-
Save kuatsure/2dda82e6caa97b3acae9 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.0.rc.1) | |
// Compass (v1.0.0.alpha.20) | |
// ---- | |
$wrapper: ".thing"; | |
@mixin when-drawer-is-open { | |
@at-root #{selector-replace(&, | |
"#{$wrapper}", | |
"#{$wrapper}[data-drawer=\"open\"]")} { | |
@content | |
} | |
} | |
#{$wrapper} { | |
&.thing-1 { | |
color: red; | |
@include when-drawer-is-open { | |
color: blue; | |
} | |
} | |
} | |
#{$wrapper} { | |
.thing-2 { | |
color: red; | |
@include when-drawer-is-open { | |
color: blue; | |
} | |
} | |
} |
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
.thing.thing-1 { | |
color: red; | |
} | |
.thing-1.thing[data-drawer="open"] { | |
color: blue; | |
} | |
.thing .thing-2 { | |
color: red; | |
} | |
.thing[data-drawer="open"] .thing-2 { | |
color: blue; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment