@each $breakpoint in map-keys($grid-breakpoints) {
  @include media-breakpoint-down($breakpoint) {
    $infix: breakpoint-infix($breakpoint, $grid-breakpoints);

    @each $prop, $abbrev in (margin: m, padding: p) {
      @each $size, $length in $spacers {

        .#{$abbrev}#{$infix}-d-#{$size} { #{$prop}: $length !important; }
        .#{$abbrev}t#{$infix}-d-#{$size},
        .#{$abbrev}y#{$infix}-d-#{$size} {
          #{$prop}-top: $length !important;
        }
        .#{$abbrev}r#{$infix}-d-#{$size},
        .#{$abbrev}x#{$infix}-d-#{$size} {
          #{$prop}-right: $length !important;
        }
        .#{$abbrev}b#{$infix}-d-#{$size},
        .#{$abbrev}y#{$infix}-d-#{$size} {
          #{$prop}-bottom: $length !important;
        }
        .#{$abbrev}l#{$infix}-d-#{$size},
        .#{$abbrev}x#{$infix}-d-#{$size} {
          #{$prop}-left: $length !important;
        }
      }
      .#{$abbrev}t#{$infix}-d-0,
      .#{$abbrev}y#{$infix}-d-0 {
        #{$prop}-top: 0 !important;
      }
      .#{$abbrev}r#{$infix}-d-0,
      .#{$abbrev}x#{$infix}-d-0 {
        #{$prop}-right: 0 !important;
      }
      .#{$abbrev}b#{$infix}-d-0,
      .#{$abbrev}y#{$infix}-d-0 {
        #{$prop}-bottom: 0 !important;
      }
      .#{$abbrev}l#{$infix}-d-0,
      .#{$abbrev}x#{$infix}-d-0 {
        #{$prop}-left: 0 !important;
      }
    }

    // Some special margin utils
    .m#{$infix}-d-auto { margin: auto !important; }
    .mt#{$infix}-d-auto,
    .my#{$infix}-d-auto {
      margin-top: auto !important;
    }
    .mr#{$infix}-d-auto,
    .mx#{$infix}-d-auto {
      margin-right: auto !important;
    }
    .mb#{$infix}-d-auto,
    .my#{$infix}-d-auto {
      margin-bottom: auto !important;
    }
    .ml#{$infix}-d-auto,
    .mx#{$infix}-d-auto {
      margin-left: auto !important;
    }
  }
}
