@each $bp, $breakpoint in $responsive-map {
  @if map-get($breakpoint, min) == 'none' {
    @media (max-width: #{map-get($breakpoint, max)}) {
      @each $prp, $property in $property-list {
        @each $amt, $amount in $amount-list {
          @each $dir, $direction in $direction-map {
            .#{$prp}#{nth($direction, 1)}#{$amt}-#{map-get($breakpoint, code)}, .#{$prp}#{nth($direction, 2)}#{$amt}-#{map-get($breakpoint, code)}, .#{$prp}#{nth($direction, 3)}#{$amt}-#{map-get($breakpoint, code)} { #{$property}-#{$dir}: $amount;          }
          }
        }
      }
    }
  } @else if map-get($breakpoint, max) == 'none' {
    @media (min-width: #{map-get($breakpoint, min)}) {
      @each $prp, $property in $property-list {
        @each $amt, $amount in $amount-list {
          @each $dir, $direction in $direction-map {
            .#{$prp}#{nth($direction, 1)}#{$amt}-#{map-get($breakpoint, code)}, .#{$prp}#{nth($direction, 2)}#{$amt}-#{map-get($breakpoint, code)}, .#{$prp}#{nth($direction, 3)}#{$amt}-#{map-get($breakpoint, code)} { #{$property}-#{$dir}: $amount;          }
          }
        }
      }
    }
  } @else {
    @media (min-width: #{map-get($breakpoint, min)}) and (max-width: #{map-get($breakpoint, max)}) {
      @each $prp, $property in $property-list {
        @each $amt, $amount in $amount-list {
          @each $dir, $direction in $direction-map {
            .#{$prp}#{nth($direction, 1)}#{$amt}-#{map-get($breakpoint, code)}, .#{$prp}#{nth($direction, 2)}#{$amt}-#{map-get($breakpoint, code)}, .#{$prp}#{nth($direction, 3)}#{$amt}-#{map-get($breakpoint, code)} { #{$property}-#{$dir}: $amount;          }
          }
        }
      }
    }
  }
}