Skip to content

Instantly share code, notes, and snippets.

@juliocesar
Created February 10, 2014 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juliocesar/8924888 to your computer and use it in GitHub Desktop.
Save juliocesar/8924888 to your computer and use it in GitHub Desktop.
A breakpoints mixin I use, taken from some post by Chris Coyer that I can't remember right now.
// Screen size breakpoints
// =======================
//
// Example usage:
//
// .page-header
// +breakpoint(desktop)
// width: 50%
// +breakpoint(tablet)
// width: 80%
// width: 75%
@mixin breakpoint($point)
@if $point == tablet
@media (max-width: $desktop-width)
@content
@else if $point == mobile
@media (max-width: $tablet-width)
@content
@else
@media (max-width: $point)
@content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment