Skip to content

Instantly share code, notes, and snippets.

@cfarm
Created November 11, 2013 23:55
Show Gist options
  • Save cfarm/7422759 to your computer and use it in GitHub Desktop.
Save cfarm/7422759 to your computer and use it in GitHub Desktop.
Breakpoint Mixin for Media Queries, with Variables
$smallScreen: 400px;
$mediumScreen: 700px;
div.column {
width: 100%;
// column width changes to be half the viewport
@include breakpoint($smallScreen) {
width: 50%;
float: left;
}
//column width changes again to be one third of the viewport
@include breakpoint($mediumScreen) {
width: 33%;
float: left;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment