Guest User

Untitled

a guest
Dec 8th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. @mixin for-size($size) {
  2. @if $size == phone-only {
  3. @media (max-width: 599px) { @content; }
  4. } @else if $size == tablet-portrait-up {
  5. @media (min-width: 600px) { @content; }
  6. } @else if $size == tablet-landscape-up {
  7. @media (min-width: 900px) { @content; }
  8. } @else if $size == desktop-up {
  9. @media (min-width: 1200px) { @content; }
  10. } @else if $size == big-desktop-up {
  11. @media (min-width: 1800px) { @content; }
  12. }
  13. }
  14.  
  15. // usage
  16. .my-box {
  17. padding: 10px;
  18.  
  19. @include for-size(desktop-up) {
  20. padding: 20px;
  21. }
  22. }
Add Comment
Please, Sign In to add comment