Skip to content

Instantly share code, notes, and snippets.

@FriendlyWP
Created December 13, 2018 17:52
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 FriendlyWP/8b3fb027f7a1f1ae7649f356f4636db1 to your computer and use it in GitHub Desktop.
Save FriendlyWP/8b3fb027f7a1f1ae7649f356f4636db1 to your computer and use it in GitHub Desktop.
/*********************
Breakpoints
*********************/
/* usage: @include bp(tablet) { // your styles here } */
@mixin bp($point) {
@if $point == widescreen { // 1440px
@media (min-width: 90em) { @content ; }
}
@elseif $point == tv { // 1300px
@media (min-width: 81.25em) { @content ; }
}
@else if $point == desktop { // 1184px
@media (min-width: 74em) { @content ; }
}
@else if $point == laptop { // 1024px
@media (min-width: 64em) { @content ; }
}
@else if $point == tablet { // 800px
@media (min-width: 50em) { @content ; }
}
@else if $point == phablet { // 600px
@media (min-width: 37.5em) { @content ; }
}
@else if $point == mobileonly { // 400px
@media (max-width: 25em) { @content ; }
}
@else if $point == print {
@media (print) { @content ; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment