Skip to content

Instantly share code, notes, and snippets.

@graste
Forked from jpavon/gist:5833682
Created October 3, 2013 22:38
Show Gist options
  • Select an option

  • Save graste/6818211 to your computer and use it in GitHub Desktop.

Select an option

Save graste/6818211 to your computer and use it in GitHub Desktop.
@mixin elementquery() {
@media (min-width: 32.5em) { .content & { @content; } }
@media (min-width: 90em) { .aside & { @content; } }
}
.schedule-component {
@include elementquery() {
color: pink;
}
}
// Output:
@media (min-width: 32.5em) {
.content .schedule-component {
color: pink;
}
}
@media (min-width: 90em) {
.aside .schedule-component {
color: pink;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment