Skip to content

Instantly share code, notes, and snippets.

@dlh01
Created October 20, 2012 06:43
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 dlh01/3922398 to your computer and use it in GitHub Desktop.
Save dlh01/3922398 to your computer and use it in GitHub Desktop.
SASS mixin for Bootstrap breakpoints
/**
* Bootstrap breakpoints. Thanks goes to Chris Coyier for the inspiration.
*
* Original post and usage example: http://css-tricks.com/custom-user-mixins/
*/
@mixin breakpoint($point) {
@if $point == large-display {
@media (min-width: 1200px) { @content; }
}
@if $point == default {
@media (min-width: 908px) { @content; }
}
@if $point == portrait-tablets {
@media (min-width: 768px) { @content; }
}
@if $point == phones-to-tablets {
@media (max-width: 767px) { @content; }
}
@if $point == phones {
@media (max-width: 480px) { @content; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment