Last active
August 29, 2015 14:24
-
-
Save danielhusar/bd3572f978e392537320 to your computer and use it in GitHub Desktop.
Nested mixin inside media queries
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
@mixin query { | |
@media only screen and (max-width: 8888888px) { | |
@content; | |
} | |
} | |
@media all and (min-width: 1px) { | |
body { | |
color: black; | |
@media all and (max-width: 999999px) { | |
color: white; | |
} | |
@mixin query { | |
color: blue; | |
} | |
} | |
} | |
/** | |
Outputs: | |
@media all and (min-width: 1px) { | |
body { | |
color: black; | |
} | |
} | |
@media all and (min-width: 1px) and (max-width: 999999px) { | |
body { | |
color: white; | |
} | |
} | |
**/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Retina mixin doesn't get outputted and merged with parent media query because only screen have conflict with all.