theme.scss
1.8 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
@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;
}