Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. // ==========================================================================
  2. // Breakpoint Mixin
  3. //
  4. // Uses Sass Maps which requires Sass v3.3.0 or newer
  5. //
  6. //
  7. // EXAMPLE
  8. //
  9. // body {
  10. // @include breakpoint(tablet){
  11. // font-size: 14px;
  12. // };
  13. // }
  14.  
  15. // ==========================================================================
  16.  
  17. $breakpoints: (
  18. phone: 300px,
  19. ipad: 768px,
  20. ipad-pro: 992px,
  21. desktop: 1200px,
  22. large-desktop: 1400px
  23. );
  24. @mixin breakpoint($size) {
  25. @each $breakpoint, $value in $breakpoints {
  26. @if $size == $breakpoint {
  27. @media (min-width: map-get($breakpoints, $breakpoint)) {
  28. @content;
  29. }
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement