Skip to content

Instantly share code, notes, and snippets.

@soderalohastrom
Created June 22, 2014 01:26
Show Gist options
  • Save soderalohastrom/87384786a242570e2455 to your computer and use it in GitHub Desktop.
Save soderalohastrom/87384786a242570e2455 to your computer and use it in GitHub Desktop.
Simple breakpoint implementation
@mixin breakpoint($point) {
@if $point == large {
@media (min-width: 64.375em) { @content; }
}
@else if $point == medium {
@media (min-width: 50em) { @content; }
}
@else if $point == small {
@media (min-width: 37.5em) { @content; }
}
}
//Usage:
.page-wrap {
width: 75%;
@include breakpoint(large) { width: 60%; }
@include breakpoint(medium) { width: 80%; }
@include breakpoint(small) { width: 95%; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment