// #region flex 布局

// 主轴水平方向
.mix-flex {
  /* #ifndef APP-NVUE */
  display: flex;
  /* #endif */
  flex-direction: row;
  align-items: center;
}
// 主轴垂直方向
.mix-flex-col {
  /* #ifndef APP-NVUE */
  display: flex;
  /* #endif */
  flex-direction: column;
}

// #region 主轴上的折行
.mix-flex-wrap {
  flex-wrap: wrap;
}

.mix-flex-nowrap {
  flex-wrap: nowrap;
}

.mix-flex-col-1 {
  /* #ifndef APP-NVUE */
  display: flex;
  /* #endif */
  flex-direction: column;
  flex: 1;
}

// 定义flex等分
@for $i from 0 through 12 {
  .mix-flex-#{$i} {
    flex: $i;
  }
}

// #endregion

// #region 主轴上的对齐方式
.mix-main-center {
  justify-content: center;
}

.mix-main-start {
  justify-content: flex-start;
}

.mix-main-end {
  justify-content: flex-end;
}

.mix-main-between {
  justify-content: space-between;
}

.mix-main-around {
  justify-content: space-around;
}
// #endregion

// #region 交叉轴上的对齐方式
.mix-cross-center {
  align-items: center;
}

.mix-cross-start {
  align-items: flex-start;
}

.mix-cross-end {
  align-items: flex-end;
}
// #endregion

// #endregion

// #region 字体大小（px/rpx）
// 定义字体(px)单位
@for $i from 9 to 40 {
  .mix-px-#{$i} {
    font-size: $i + px;
  }
}
// 定义字体(rpx)单位
@for $i from 18 through 80 {
  .mix-rpx-#{$i} {
    font-size: $i + rpx;
  }
}
// #endregion

// #region 尺寸（宽高、最大、最小）
@for $i from 0 through 100 {
  .mix-h-#{$i} {
    height: $i + % !important;
  }
  .mix-vh-#{$i} {
    height: $i + vh !important;
  }
  .mix-w-#{$i} {
    width: $i + % !important;
  }
  .mix-vw-#{$i} {
    width: $i + vw !important;
  }
  .mix-wh-#{$i} {
    width: $i + % !important;
    height: $i + % !important;
  }
  .mix-vwh-#{$i} {
    width: $i + vw !important;
    height: $i + vh !important;
  }

  .mix-min-h-#{$i} {
    min-height: $i + % !important;
  }
  .mix-min-vh-#{$i} {
    min-height: $i + vh !important;
  }
  .mix-min-w-#{$i} {
    min-width: $i + % !important;
  }
  .mix-min-vw-#{$i} {
    min-width: $i + vw !important;
  }

  .mix-max-h-#{$i} {
    max-height: $i + % !important;
  }
  .mix-max-vh-#{$i} {
    max-height: $i + vh !important;
  }
  .mix-min-h-#{$i} {
    min-height: $i + % !important;
  }
  .mix-min-vh-#{$i} {
    min-height: $i + vh !important;
  }
}

.mix-full {
  height: calc(100vh - var(--window-top) - var(--window-bottom));
}

// #endregion

// $maxrpx: 10;
// @for $x1 from 0 through $maxrpx {
//   @if $x1 % 10 == 0 {
//     .mix-m-#{$x1} {
//       margin: $x1 * 1rpx !important;
//     }
//     @for $x2 from 0 through $maxrpx {
//       @if $x2 % 10 == 0 {
//         @if $x1 != $x2 {
//           // 定义外边距
//           .mix-m-#{$x1}-#{$x2} {
//             margin: $x1 * 1rpx $x2 * 1rpx !important;
//           }
//         }
//       }
//     }
//     @for $x2 from 0 through $maxrpx {
//       @if $x2 % 10 == 0 {
//         @for $x3 from 0 through $maxrpx {
//           @if $x3 % 10 == 0 {
//             @if $x1!= $x2 or $x2 != $x3 {
//               // 定义外边距
//               .mix-m-#{$x1}-#{$x2}-#{$x3} {
//                 margin: $x1 * 1rpx $x2 * 1rpx $x3 * 1rpx !important;
//               }
//             }
//           }
//         }
//       }
//     }
//   }
// }
