-
Notifications
You must be signed in to change notification settings - Fork 1
/
style_component.css
476 lines (406 loc) · 11.1 KB
/
style_component.css
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
/* -=========这里是比较通用的样式,能够在多个组件中使*/
/* -通常叠加在组件的样式之上 */
@font-face {
font-family: "Impact";
src: url(./fonts/zzz-eng.TTF) format("truetype");
font-weight: normal
}
@font-face {
font-family: "hongmengti";
src: url(./fonts/zzz-chs.ttf) format("truetype");
font-weight: bold
}
.font-num {
font-family: Impact, "Microsoft YaHei", 微软雅黑, "MicrosoftJhengHei", 华文细黑, STHeiti, MingLiu, sans-serif;
font-weight: 100;
}
.font-hongmeng {
font-family: "Microsoft YaHei", 微软雅黑, "MicrosoftJhengHei", 华文细黑, STHeiti, MingLiu, sans-serif;
font-weight: 1000;
font-size: 0.93em;
}
.OO-parallelogram {
transform: skew(-20deg);
border-radius: 10px;
}
.OO-parallelogram>* {
/* display: block; */
transform: skew(20deg);
}
.OO-colunm {
display: flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: flex-start;
}
.OO-colunm-center {
display: flex;
flex-direction: column;
flex-wrap: nowrap;
align-items: center;
justify-content: flex-start;
width: 100%;
}
div.OO-colorfull-border {
animation: huerotate 6s infinite linear;
filter: hue-rotate(360deg);
}
@keyframes huerotate {
0% {
filter: hue-rotate(0deg);
}
100% {
filter: hue-rotate(360deg);
}
}
.fit-parent-width {
height: 100%;
width: 0;
padding-left: 100%;
overflow: hidden;
background-position: center;
background-size: cover;
background-repeat: no-repeat;
position: absolute;
top: 0;
left: 0;
}
/* -=============组件样式,实现自定义组件的默认样式=============== */
s-chip {
transform: skew(-20deg);
position: relative;
height: fit-content;
align-items: center;
z-index: 1;
}
s-chip p {
display: block;
transform: skew(20deg);
width: fit-content;
height: fit-content;
white-space: nowrap;
line-height: 1;
margin: 10px 0px;
font-weight: bold;
transition: all 0.3s ease-in-out 0s;
}
s-chip[type=filled-tonal] {
border: 1px solid var(--s-color-outline);
color: var(--s-color-on-primary);
}
s-tooltip p {
margin: 0;
line-height: 1;
}
s-divider {
width: 83%;
margin: 10px 0;
}
s-card {
height: 350px;
margin: 6px 0;
border-radius: 0px 30px 0px 30px;
}
s-tooltip>p {
line-height: 1.2;
word-wrap: break-word;
max-width: 120px;
overflow-wrap: break-word;
white-space: normal;
text-align: left;
}
img {
-webkit-user-drag: none;
-moz-user-drag: none;
-ms-user-drag: none;
}
p {
height: fit-content;
width: fit-content;
}
::-webkit-scrollbar {
width: 6px;
height: 6px;
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--s-color-outline-variant, #c1c7ce);
border-radius: 3px;
transform: translateX(-10px);
}
/* -=================左侧粘性按钮================ */
.left-adhesive-button {
/* background-color: black; */
height: 45px;
border-radius: 0px 25px 25px 0px;
position: relative;
padding: 13px;
transition: all 0.3s ease-in-out 0s;
transform: translateX(0px);
width: 100%;
margin-right: 40px;
}
/* .left-adhesive-button p{
transform: translateX(20px);
transition: all 0.1s ease-in-out 0s;
} */
.left-adhesive-button::before {
content: "";
position: absolute;
top: 3px;
bottom: 3px;
left: -100px;
right: 3px;
border: 2px solid gray;
border-radius: 0px 19px 19px 0px;
}
.left-adhesive-button[type='elevated'] {
background-color: var(--s-color-background);
box-shadow: 0px 0px 0px 2px var(--s-color-primary);
transform: translateX(-20px);
}
/* .left-adhesive-button[type='elevated'] p{
transform: translateX(0px);
transition: all 0.1s ease-in-out 0s;
} */
/* -=================右侧粘性按钮================ */
.right-adhesive-button {
/* background-color: black; */
height: 45px;
border-radius: 25px 0px 0px 25px;
position: relative;
padding: 13px;
transition: all 0.3s ease-in-out 0s;
transform: translateX(0px);
width: 100%;
margin-left: 20%;
}
.right-adhesive-button p {
transform: translateX(-20px);
}
.right-adhesive-button::before {
content: "";
position: absolute;
top: 3px;
bottom: 3px;
left: 3px;
right: -100px;
border: 2px solid gray;
border-radius: 19px 0px 0px 19px;
}
.right-adhesive-button[type='elevated'] {
background-color: var(--s-color-background);
box-shadow: 0px 0px 0px 2.5px var(--s-color-primary);
transform: translateX(20px);
}
.right-adhesive-button[type='elevated'] p {
transform: translateX(0px);
}
/* -=================并列按钮条组件================ */
.button-bar {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: center;
align-items: center;
align-content: center;
margin: 10px 0;
width: 83%;
position: relative;
}
.button-bar-item {
height: 40px;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: center;
align-items: center;
align-content: center;
position: relative;
padding: 0px 20px 0px 20px;
/* 外边框 */
border: 1px solid var(--s-color-outline);
}
.button-bar .button-bar-item:first-child {
/* 这是一个左边是方形,右边有圆角的平行四边形 */
border-radius: 0px 10px 10px 0px;
transform: skew(-20deg);
/* 将最左边裁剪掉 */
clip-path: polygon(12px 0, 100% 0, 100% 100%, 26px 100%);
}
.button-bar .button-bar-item:not(:first-child):not(:last-child) {
/* 这是一个圆角平行四边形 */
transform: skew(-20deg);
border-radius: 10px;
margin: 0 2px;
width: fit-content;
padding: 10px 20px;
transition: all 0.3s ease-in-out 0s;
}
.button-bar .button-bar-item:last-child {
/* 这是一个右边是方形,左边有圆角的平行四边形 */
border-radius: 10px 0px 0px 10px;
transform: skew(-20deg);
/* 将最右边裁剪掉 */
clip-path: polygon(0 0, calc(100% - 26px) 0, calc(100% - 13px) 100%, 0 100%)
}
/* 使用 after 来绘制左侧的圆 */
.button-bar::before {
content: "";
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0px;
border-radius: 20px 20px 20px 20px;
border: 1px solid var(--s-color-outline);
/* 裁剪掉中间部分,只显示两端 */
clip-path: polygon(0 0, 0 100%, 100% 100%, 100% 0, calc(100% - 20px) 0, calc(100% - 20px) 100%, 20px 100%, 20px 0);
/* background-color: var(--s-color-surface-container-high); */
}
.button-bar-item>* {
transform: skew(20deg);
}
/* -=================默认箱体样式================ */
.OO-box {
border-radius: 20px;
border: 3px solid var(--s-color-outline-variant);
background-color: var(--s-color-surface-container-high);
padding: 10px;
}
/* -=================设置条组件================ */
.OO-setting-bar {
position: relative;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: space-between;
align-items: center;
align-content: center;
margin: 10px 0;
width: calc(100% - 40px);
height: 50px;
position: relative;
background-color: var(--s-color-surface-container-low);
color: var(--s-color-on-surface);
border-radius: 28px;
padding: 0 20px;
box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.2);
text-overflow: ellipsis;
}
.OO-setting-bar h3 {
margin: 0;
line-height: 1;
font-weight: bold;
font-size: 1.2em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 50%;
padding:5px 0;
}
.OO-setting-bar s-text-field {
position: absolute;
--text-field-border-radius: 24px;
--text-field-padding: 24px;
--border-radius: 24px;
border-radius: 24px;
background-color: var(--s-color-background);
box-shadow: inset 2px 2px 10px var(--s-color-surface-container-high);
--border-color: var(--s-color-outline-variant);
--border-width: 2px;
right: 5px;
height: calc(100% - 10px);
min-height: 0px;
min-width: 155px;
width: calc(30% + 5px);
max-width: 305px;
}
.OO-setting-bar input[type='radio'] {
display: none;
}
.OO-setting-bar input[type='radio']:checked+label>s-chip {
background-color: var(--s-color-primary);
color: var(--s-color-on-primary);
}
.OO-setting-bar s-switch {
position: absolute;
right: 10px;
width: 50px;
height: calc(100% - 20px);
min-height: 0px;
}
.OO-setting-bar s-button {
position: absolute;
right: 10px;
min-width: 58px;
height: calc(100% - 20px);
min-height: 0px;
font-size: 0.97em;
font-weight: 500;
min-width: 150px;
width: 30%;
max-width: 300px;
}
.OO-setting-bar s-picker{
position: absolute;
color: var(--s-color-on-surface);
--border-radius: 24px;
border-radius: 24px;
background-color: var(--s-color-background);
box-shadow: inset 2px 2px 10px var(--s-color-surface-container-high);
--border-color: var(--s-color-outline-variant);
--border-width: 2px;
right: 5px;
--height: 41px;
--padding: 72px;
height: calc(100% - 10px);
min-height: 0px;
min-width: 155px;
width: calc(30% + 5px);
max-width: 305px;
}
.OO-setting-bar s-button:not([type='text']) {
box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.2);
border-color: var(--s-color-outline-variant);
border-width: 2px;
background-color: var(--s-color-surface-container-lowest);
color: var(--s-color-on-surface);
}
.OO-setting-bar s-tooltip * {
text-overflow: initial;
overflow: visible;
}
.OO-shade-box {
box-shadow: inset 2px 2px 10px var(--s-color-surface-container-high);
border-color: var(--s-color-outline-variant);
border-width: 2px;
background-color: var(--s-color-background);
color: var(--s-color-on-surface);
--border-color: var(--s-color-outline-variant);
--border-width: 2px;
--border-radius: 20px;
}
.OO-button-box {
align-items: center;
align-content: center;
margin: 10px 0;
width: calc(100% - 40px);
height: 50px;
position: relative;
background-color: var(--s-color-surface-container-low);
color: var(--s-color-on-surface);
border-radius: 28px;
padding: 0 20px;
box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.2);
}
.OO-center-bg{
/* 背景图垂直、水平均居中 */
background-position: center center;
/* 背景图不平铺 */
background-repeat: no-repeat;
/* 当内容高度大于图片高度时,背景图像的位置相对于viewport固定 */
/* background-attachment: fixed; */
/* 让背景图基于容器大小伸缩 */
background-size: cover;
}