Skip to content

Instantly share code, notes, and snippets.

@kevinSuttle
Created December 5, 2012 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kevinSuttle/4217399 to your computer and use it in GitHub Desktop.
Save kevinSuttle/4217399 to your computer and use it in GitHub Desktop.
Overriding variable scope in Sass
$sans-font-stack: Arial, Helvetica, sans-serif;
.featured, .ads, time, footer, .social, summary, .sidebar, .feed, .intro { font-family: $sans-font-stack; }
/*
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: ? }
@justin-c-rounds
Copy link

$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;
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment