$breakpoints: (
  'iphone5' '(max-device-width: 320px)', 'palm' '(max-width: 480px)', 'lap' '(min-width: 481px) and (max-width: 1024px)', 'portable' '(max-width: 1026px)', 'desk' '(min-width: 1027px)', 'ipad' '(min-device-width: 768px) and (max-device-width: 1024px)', 'ipadLandscape' '(min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape)'
) !default;
$breakpoint-has-widths: ('palm', 'lap', 'portable', 'desk') !default;
$breakpoint-has-push: ('palm', 'lap', 'portable', 'desk') !default;
$breakpoint-has-pull: ('palm', 'lap', 'portable', 'desk') !default;

@mixin gmq($media-query) {
  $breakpoint-found: false;

  @each $breakpoint in $breakpoints {
    $name: nth($breakpoint, 1);
    $declaration: nth($breakpoint, 2);

    @if $media-query == $name and $declaration {
      $breakpoint-found: true;

      @media only screen and #{$declaration} {
        @content;
      }
    }
  }

  @if $breakpoint-found == false {
    @warn "Breakpoint ‘#{$media-query}’ does not exist";
  }
}
