-
-
Save justin-c-rounds/4217603 to your computer and use it in GitHub Desktop.
Overriding variable scope 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
$sans-font-stack: Arial, Helvetica, sans-serif; | |
.featured, .ads, time, footer, .social, summary, .sidebar, .feed, .intro { font-family: $sans-font-stack; } |
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
/* | |
I want to override the font stack inside media queries. | |
Something like '$sans-font-stack: Georgia, Palatino, serif;' | |
*/ | |
.featured, .ads, time, footer, .social, summary, .sidebar, .feed, .intro { font-family: ? } | |
/* | |
Something like this? | |
*/ | |
$sans-font-stack: Arial, Helvetica, sans-serif; | |
$landscape-font-stack: Georgia, serif; | |
.featured, .ads, time, footer, .social, summary, .sidebar, .feed, .intro { | |
font-family: $sans-font-stack; | |
@media (orientation: landscape) { | |
font-family: $landscape-font-stack; | |
} | |
} |
Author
justin-c-rounds
commented
Dec 5, 2012
So, just a different variable then? I'm thinking mixins might be a good choice too. Thanks for taking a look!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment