Created
February 27, 2018 15:49
-
-
Save justinryder/cd01a67a4d4b3781867239e4687ac30d to your computer and use it in GitHub Desktop.
You can nest media queries in SASS!
This file contains 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.21) | |
// Compass (v1.0.3) | |
// ---- | |
.foo { | |
content: 'no media query'; | |
@media screen and (min-width: 640px) { | |
content: 'min-width: 640px'; | |
@media (max-width: 1024px) { | |
content: 'min-width: 640px and max-width: 1024px'; | |
} | |
} | |
@media screen and (min-width: 1024px) { | |
content: 'max-width: 1024px'; | |
} | |
} |
This file contains 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
.foo { | |
content: 'no media query'; | |
} | |
@media screen and (min-width: 640px) { | |
.foo { | |
content: 'min-width: 640px'; | |
} | |
} | |
@media screen and (min-width: 640px) and (max-width: 1024px) { | |
.foo { | |
content: 'min-width: 640px and max-width: 1024px'; | |
} | |
} | |
@media screen and (min-width: 1024px) { | |
.foo { | |
content: 'max-width: 1024px'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment