Skip to content

Instantly share code, notes, and snippets.

@jasonkmccoy
Created March 14, 2015 21:49
Show Gist options
  • Save jasonkmccoy/b169ad235652caa39332 to your computer and use it in GitHub Desktop.
Save jasonkmccoy/b169ad235652caa39332 to your computer and use it in GitHub Desktop.
breakpoint mixin
=break-point($point)
@if $point == desktop
@media only screen and (max-width: 50em)
@content
@else if $point == mobile
@media only screen and (max-width: 20em)
@content
// Usage
div
margin: 5em
+break-point(mobile)
margin: 2em
@jasonkmccoy
Copy link
Author

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