_mixins-breakpoints.scss 959 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*--------------------------------------------------------------*/
  2. /* !## Breakpoint Mixins */
  3. /*--------------------------------------------------------------*/
  4. /*
  5. Breakpoints
  6. Src: https://responsivedesign.is/develop/getting-started-with-sass
  7. Usage:
  8. .grid-1-4 {
  9. width: 100%;
  10. @include breakpoint(phablet) {
  11. width: 50%;
  12. }
  13. @include breakpoint(laptop) {
  14. width: 25%;
  15. }
  16. }
  17. */
  18. @mixin breakpoint($point) {
  19. @if $point == desktop {
  20. @media screen and (min-width: 75em) { @content ; }
  21. }
  22. @else if $point == laptop {
  23. @media screen and (min-width: 60em) { @content ; }
  24. }
  25. @else if $point == tablet {
  26. @media screen and (min-width: 50em) { @content ; }
  27. }
  28. @else if $point == tabletonly {
  29. @media screen and (max-width: 50em) { @content ; }
  30. }
  31. @else if $point == phablet {
  32. @media screen and (min-width: 37.5em) { @content ; }
  33. }
  34. @else if $point == mobileonly {
  35. @media screen and (max-width: 37.5em) { @content ; }
  36. }
  37. }