Guest User

Untitled

a guest
Apr 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. $viewports: (
  2. all: 0px,
  3. xs: 480px,
  4. sm: 768px,
  5. md: 992px,
  6. lg: 1200px,
  7. xl: 1400px
  8. );
  9. $viewport-names: map-keys($viewports);
  10.  
  11. @mixin respond($min, $max: null) {
  12. @if $max != null {
  13. @if map-has-key($viewports, $min) and map-has-key($viewports, $max) {
  14. @media (min-width: #{map-get($viewports, $min)}) and (max-width: #{map-get($viewports, $max) - 1px}) {
  15. @content;
  16. }
  17. }
  18. } @else if map-has-key($viewports, $min) {
  19. @media (min-width: #{map-get($viewports, $min)}) {
  20. @content;
  21. }
  22. }
  23. }
Add Comment
Please, Sign In to add comment