Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.