mixin.scss
2.49 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
// mixin
// 清除浮动
@mixin clearfix {
&:after {
content: '';
display: table;
clear: both;
}
}
// 多行隐藏
@mixin textoverflow($clamp: 1) {
display: block;
overflow: hidden;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: $clamp;
/*! autoprefixer: ignore next */
-webkit-box-orient: vertical;
}
//flex box
@mixin flexbox($jc: space-between, $ai: center, $fd: row, $fw: nowrap) {
display: flex;
display: -webkit-flex;
flex: 1;
justify-content: $jc;
-webkit-justify-content: $jc;
align-items: $ai;
-webkit-align-items: $ai;
flex-direction: $fd;
-webkit-flex-direction: $fd;
flex-wrap: $fw;
-webkit-flex-wrap: $fw;
}
@mixin cell($fs: 14px, $fw: 400, $margin: 8px 0, $bgc: #fff) {
background-color: $bgc;
margin: $margin;
font-size: $fs;
font-weight: $fw;
color: #323233;
padding: 0 16px;
}
@mixin font($fs: 14px, $fw: 400, $c:#3975c6){
font-size: $fs;
font-weight: $fw;
color: $c;
}
@mixin mainfont($fs: 14px, $fw: 400) {
@include font($fs,$fw,#3975c6)
}
@mixin darkfont($fs: 14px, $fw: 400, $c: #323233) {
@include font($fs,$fw,$c)
}
@mixin tit {
font-size: 18px;
font-weight: 600;
padding: 14px 0;
display: block;
color: #414143;
}
@mixin textarea{
.content {
display: flex;
flex-direction: column;
.van-cell {
&__title {
flex: 1;
}
&__value {
flex: 0 0 84px;
margin-top: 12px;
background: #f7f8fa;
border-radius: 8px;
}
}
}
}
@mixin recell($mt:8px){
/deep/.van-cell {
margin-top: $mt;
&__title {
margin-right: 8px;
flex: 0 0 70px;
}
&.l{
.van-cell__title {
flex: 0 0 92px;
}
}
&.m{
.van-cell__title {
margin-right: 0;
flex: 0 0 63px;
}
}
}
}
@mixin cellradio {
@include recell();
.radio {
/deep/.van-radio,.van-checkbox {
flex: 1 1 50%;
margin: 14px 0 0;
&:nth-child(1),
&:nth-child(2) {
margin-top: 0;
}
}
}
@include textarea()
}
@mixin btnMain{
flex: 1;
height: 40px;
background-color: $main-color;
border-radius: 100px;
@include font(14px,400,#fff);
}
@mixin card{
display: flex;
height: 142px;
background: #fff;
box-shadow: 0px 2px 12px 0px rgba(100, 101, 102, 0.12);
border-radius: 4px;
padding: 16px;
margin-bottom: 8px;
}
@mixin mt($t:5px){
margin-top: $t;
}
@mixin flexcenter{
display: flex;
justify-content: center;
align-items: center;
}