app.sass 3.75 KB
// 只生成运行时代码实际引用的字号,避免连续生成 1~1070 放大主包。
$font-size-values: (
  1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
  21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, 40, 42,
  43, 44, 45, 46, 48, 50, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 64, 65, 66,
  68, 70, 71, 72, 73, 74, 75, 76, 80, 82, 84, 86, 88, 90, 92, 94, 96, 97, 98,
  100, 102, 104, 106, 108, 110, 112, 114, 115, 116, 117, 118, 120, 122, 124,
  126, 128, 129, 130, 132, 134, 135, 136, 138, 140, 142, 143, 144, 146, 148,
  150, 152, 156, 158, 160, 164, 165, 168, 170, 172, 174, 175, 176, 178, 180,
  182, 184, 185, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 205, 208,
  210, 211, 212, 214, 215, 216, 220, 224, 226, 228, 230, 232, 234, 236, 239,
  240, 246, 248, 250, 251, 252, 256, 258, 260, 262, 264, 270, 276, 280, 282,
  284, 288, 290, 292, 296, 300, 304, 306, 307, 312, 320, 324, 327, 328, 330,
  331, 332, 334, 335, 336, 338, 340, 344, 350, 352, 355, 360, 366, 376, 378,
  380, 384, 390, 392, 394, 400, 404, 406, 410, 426, 428, 430, 432, 440, 442,
  444, 450, 452, 458, 460, 468, 480, 488, 492, 498, 500, 506, 522, 526, 532,
  534, 536, 540, 542, 544, 546, 552, 558, 560, 566, 574, 576, 592, 594, 600,
  606, 608, 610, 618, 620, 622, 630, 633, 640, 646, 648, 654, 662, 670, 676,
  686, 694, 702, 708, 710, 750, 760, 776, 782, 800, 840, 870, 887, 976, 999,
  1020, 1060
);

$font-size-content-values: (
  4, 6, 8, 9, 10, 12, 14, 16, 20, 40, 53, 80, 99, 110, 140, 162
);

@font-face {
  font-family: "numberNor";
  src: url("https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/font/D-DIN-PRO-500-Medium.ttf");
}

@font-face {
  font-family: "numberBold";
  src: url("https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/font/D-DIN-PRO-700-Bold.ttf");
}

page {
  /* 兼容 IOS<11.2 先constant再env */
  --constantSafeAreaInsetBottom: constant(safe-area-inset-bottom);
  /* 兼容 IOS>11.2 */
  --envSafeAreaInsetBottom: env(safe-area-inset-bottom);

  @each $size in $font-size-values {
    --fontSize#{$size}: calc(#{$size}vmin / 7.5);
  }

  @each $size in $font-size-content-values {
    --fontSizeContent#{$size}: calc(#{$size}vmin / 7.176);
  }

  @media screen and (min-device-width: 768px) and (-webkit-min-device-pixel-ratio: 1) {
    @each $size in $font-size-values {
      --fontSize#{$size}: calc(#{$size}vmin / 8.5);
    }

    @each $size in $font-size-content-values {
      --fontSizeContent#{$size}: calc(#{$size}vmin / 6.719);
    }
  }

  image {
    width: 100%;
    height: 100%;
    vertical-align: top;
  }

  .y-center {
    top: 50%;
    transform: translateY(-50%);
  }

  .x-center {
    left: 50%;
    transform: translateX(-50%);
  }

  .box-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .text-hide {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .text-center {
    display: flex;
    align-items: center;
    justify-content: center;
  }


  .two-text {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .isFullSucreen {
    box-sizing: border-box;
    padding-bottom: constant(safe-area-inset-bottom) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    // padding-bottom: 34px !important;
  }

  .isFullSucreen-bottom {
    bottom: 34px !important;
  }

  .list-nothing {
    padding: var(--fontSize30) 0;
    text-align: center;
    font-size: var(--fontSize28);
    color: #666666;
  }

  .list-not {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: var(--fontSize24);
    height: 100%;
  }

  .bgcw {
    background-color: #fff;
  }
}