Skip to content

Instantly share code, notes, and snippets.

@bencallahan
Created December 20, 2012 19:34
Show Gist options
  • Select an option

  • Save bencallahan/4347971 to your computer and use it in GitHub Desktop.

Select an option

Save bencallahan/4347971 to your computer and use it in GitHub Desktop.
// _styles.scss
// all styles not in media queries are served through "my-base"
@include my-base {
header, section, aside, footer {
background-color: #ddd;
margin: 1em 5%;
padding: 1em 5%;
width: 80%;
float: left;
}
}
// all media query styles are served through "my-media"
@include my-media("(min-width: 40em)") {
section, aside {
width: 30%;
}
aside {
float: right;
}
}
// the "false" parameter hides these styles from old IE
@include my-media("(min-width: 60em)", false) {
section {
width: 45%;
}
aside {
width: 15%;
}
aside {
float: right;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment