index.scss
2.56 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
139
140
141
142
143
144
145
146
147
148
149
150
151
@import 'reset.css';
@import 'variables';
@import 'animate.css';
$prefix: paas !default;
@font-face {
font-family: 'PingFangSC-Regular';
src: url('https://img02.glsx.com.cn/weapp/resource/saas/scrm/fonts/PingFang-Regular.ttf');
}
#nprogress .bar {
background: $main-color !important;
height: 1px;
}
a {
text-decoration: none;
color: #303133;
}
/* 宽度100% */
.width-abs {
width: 100% !important;
}
/* 高度100% */
.height-abs {
height: 100% !important;
}
@mixin flex-row {
display: -webkit-flex;
display: flex !important;
}
@mixin flex-col {
@include flex-row;
flex-direction: column;
}
/* flex布局 */
.flex-row {
@include flex-row;
}
.flex-col {
@include flex-row;
flex-direction: column;
}
// 分布两边
.flex-row-between {
@include flex-row;
justify-content: space-between;
}
// 居中
.flex-row-center {
@include flex-row;
justify-content: center;
}
// 左右等份
.flex-row-around {
@include flex-row;
justify-content: space-around;
}
// 上下两边分布
.flex-col-between {
@include flex-col;
justify-content: space-between;
}
// 上下等份
.flex-col-around {
@include flex-col;
justify-content: space-around;
}
// 元素上下居中
.flex-col-center {
@include flex-col;
justify-content: center;
}
/* flex布局子元素位置 */
.flex-items-start {
align-items: flex-start;
}
.flex-items-center {
align-items: center;
}
.flex-items-end {
align-items: flex-end;
}
/* 换行 || 等分 */
.flex-wrap {
flex-wrap: wrap;
}
.flex-1 {
flex: 1;
}
/* 定位布局 */
.position-relative {
position: relative;
}
.position-absolute {
position: absolute;
}
.position-fixed {
position: fixed;
}
/* 元素溢出处理 */
.overflow-hidden {
overflow: hidden;
}
.overflow-auto-x {
overflow-x: auto;
}
.overflow-auto-y {
overflow-y: auto;
}
/* 文本不换行 */
.overflow-nowrap {
white-space: nowrap;
}
/* 超出一行省略 */
.overflow-ellipsis {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
/* 元素转换处理 */
@each $var in (block, inline, inline-block) {
.box-#{$var} {
display: $var;
}
}
/* 鼠标点击效果 */
@each $var in (pointer, default, wait, no-drop) {
.cursor-#{$var} {
cursor: $var;
}
}
/* 文本对齐 */
@each $var in (left, center, right) {
.text-#{$var} {
text-align: $var;
}
}
/* 阴影处理 */
.shadow {
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
.none-shadow {
box-shadow: none !important;
}
.none-border {
border: none !important;
}
@each $var in (left, top, right, bottom) {
.border-#{$var} {
border-#{$var}: solid 1px $base-border;
}
}