theme.scss 1.8 KB
  @mixin flex {
    display: flex;
  }

  @mixin flexcenter($sort:center) {
    @include flex();
    align-items: $sort;
  }

  @mixin flexCj($jus:space-between) {
    justify-content: $jus;
    @include flexcenter();
  }
  @mixin flexWrap {
    @include flexcenter();
    // justify-content: space-between;
    flex-wrap: wrap;
  }

  @mixin flexColumn {
    @include flexcenter();
    flex-direction: column;
  }
  @mixin wrap($topicWidth:686rpx) {
    width: $topicWidth;
    margin: 0 auto;
  }
  @mixin wrapPadding($topPadding:32rpx, $rightPadding:32rpx, $bottomPadding:32rpx ,$leftPadding:32rpx) {
    width: 750rpx;
    box-sizing: border-box;
    padding: $topPadding $rightPadding $bottomPadding $leftPadding;
  }
  // ios底部适配
  @mixin iosSafeDistance {
    padding-bottom: constant(safe-area-inset-bottom);
    /* 兼容 iOS < 11.2 */
    padding-bottom: env(safe-area-inset-bottom);
    /* 兼容 iOS >= 11.2 */
  }
  // 主题颜色
  $theme-color:#66D61E; 
  $main-color:#fff;
  // 主题字号
  
  // 文字超出显示...  是下面超出一行和两行的合并写法
  @mixin oneLine($count: 1) {
    @if $count<=1 {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      word-break: break-all;
    } @else {
      text-overflow: -o-ellipsis-lastline;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: $count;
      line-clamp: $count;
      -webkit-box-orient: vertical;
    }
  }
  
  @mixin grayLine($width:622rpx){
    width: $width;
    height: 1rpx;
    background: rgba(235, 237, 240, 1);    
  }
  
 @mixin common-icon-wh($width:48rpx,$height:$width) {
   width: $width;
   height: $height;
 }

	@mixin common {
		padding: 24rpx;
		box-sizing: border-box;
		background-color: #fff;
		border-radius: 16rpx;
	}