mixins.scss 1.07 KB
@mixin round-borders ($radius) {
  border-radius: $radius;
  -moz-border-radius: $radius;
  -webkit-border-radius: $radius;
}

@mixin justify-align-center() {
  display: flex;
  justify-content: center;
  align-items: center;
}

@mixin justify-align-between() {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@mixin justify-between {
  display: flex;
  justify-content: space-between;
}

@mixin justify-center() {
  display: flex;
  justify-content: center;
}

@mixin align-center() {
  display: flex;
  align-items: center;
}

@mixin ellipsis() {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

// 固定显示多上行,size:固定显示的行数
@mixin line-clamp($size) {
  overflow: hidden;
  text-overflow: ellipsis;
  line-clamp: $size;
  -webkit-line-clamp: $size;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

// 旋转角度
@mixin transform-rotate($deg) {
  transform: rotate($deg);
  -ms-transform: rotate($deg);
  -moz-transform: rotate($deg);
  -webkit-transform: rotate($deg);
  -o-transform: rotate($deg);
}