public
Created

SASS mixin for Bootstrap breakpoints

  • Download Gist
gistfile1.scss
SCSS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
/**
* 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; }
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.