// mg-、mg-h-、mg-v-、mg-l-、mg-r-、mg-t-、mg-b-
// pd-、pd-h-、pd-v-、pd-l-、pd-r-、pd-t-、pd-b-
// 0-110
// 额外单位 -px:px， 默认不填为'':rpx
// mg的特殊参数 (-m负数:例mg-100-m, mg-v-px-100-m)
@each $unit, $unitStr in (px: '-px', rpx: '') {
  @each $rpx in 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110 {
    @each $sufix, $sGrammar in (mg: margin, pd: padding) {
      .#{$sufix}#{$unitStr}-#{$rpx} {
        #{$sGrammar}: #{$rpx}#{$unit};
      }
      @each $direction, $dGrammar1, $dGrammar2 in (h, left, right),
        (v, top, bottom)
      {
        .#{$sufix}-#{$direction}#{$unitStr}-#{$rpx} {
          #{$sGrammar}-#{$dGrammar1}: #{$rpx}#{$unit};
          #{$sGrammar}-#{$dGrammar2}: #{$rpx}#{$unit};
        }
        @if #{$sufix} == 'mg' {
          .#{$sufix}-#{$direction}#{$unitStr}-#{$rpx}-m {
            #{$sGrammar}-#{$dGrammar1}: -#{$rpx}#{$unit};
            #{$sGrammar}-#{$dGrammar2}: -#{$rpx}#{$unit};
          }
        }
      }
      @each $direction, $dGrammar in (l: left, r: right, t: top, b: bottom) {
        .#{$sufix}-#{$direction}#{$unitStr}-#{$rpx} {
          #{$sGrammar}-#{$dGrammar}: #{$rpx}#{$unit};
        }
        @if #{$sufix} == 'mg' {
          .#{$sufix}-#{$direction}#{$unitStr}-#{$rpx}-m {
            #{$sGrammar}-#{$dGrammar}: -#{$rpx}#{$unit};
          }
        }
      }
    }
  }
}


// br、br-l、br-t、br-r、br-t、br-b
.br {
  border: 0.5rpx solid #f1f1f1;
}
@each $direction, $dGrammar in (l: left, r: right, t: top, b: bottom) {
  .br-#{$direction} {
    border-#{$dGrammar}: 0.5rpx solid #f1f1f1;
  }
}

// ra
// 5-60
@each $rpx in 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60 {
  .ra-#{$rpx} {
    border-radius: #{$rpx}rpx;
  }
}
.sh {
	box-shadow: 0rpx 1rpx 10rpx #aaaaaa80;
}
.sh-t {
	box-shadow: 0rpx -1rpx 10rpx #aaaaaa80;
}
