Skip to content

Instantly share code, notes, and snippets.

@hatefulcrawdad
Created August 26, 2014 20:43
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 hatefulcrawdad/84a6b2fc09b378852e32 to your computer and use it in GitHub Desktop.
Save hatefulcrawdad/84a6b2fc09b378852e32 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.2.19)
// Compass (v0.12.6)
// ----
@mixin test($selector, $color, $color2, $color3)
#{$selector} &
background: $color
@media screen and (min-width: 768px)
background: $color2
@media screen and (min-width: 1200px)
background: $color3
.class-name
background: red
+test(".parent1", red, blue, orange)
+test(".parent2", pink, yellow, brown)
.class-name {
background: red;
}
.parent1 .class-name {
background: red;
}
@media screen and (min-width: 768px) {
.parent1 .class-name {
background: blue;
}
}
@media screen and (min-width: 1200px) {
.parent1 .class-name {
background: orange;
}
}
.parent2 .class-name {
background: pink;
}
@media screen and (min-width: 768px) {
.parent2 .class-name {
background: yellow;
}
}
@media screen and (min-width: 1200px) {
.parent2 .class-name {
background: brown;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment