Skip to content

Instantly share code, notes, and snippets.

@kuatsure
Created July 24, 2014 19:21
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 kuatsure/2dda82e6caa97b3acae9 to your computer and use it in GitHub Desktop.
Save kuatsure/2dda82e6caa97b3acae9 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// 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;
}
}
}
.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