Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit a9665f6

Browse files
committed
feat(client): improve css system
1 parent 483bba6 commit a9665f6

File tree

14 files changed

+261
-283
lines changed

14 files changed

+261
-283
lines changed

packages/client/assets/style/code.css

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@
44
--color-white: #f5f5f5;
55
}
66

7-
pre {
7+
pre[class*='language-'] {
88
background: var(--color-white);
99
border: 1px solid rgba(0, 20, 80, 0.1);
1010
-webkit-box-shadow: 0 8px 16px rgba(0, 20, 80, 0.04), 0 4px 16px rgba(0, 0, 0, 0.08);
1111
box-shadow: 0 8px 16px rgba(0, 20, 80, 0.04), 0 4px 16px rgba(0, 0, 0, 0.08);
1212
border-radius: 10px;
1313
min-width: 50%;
1414
max-width: 100%;
15-
width: auto;
15+
width: fit-content;
16+
margin: var(--code-align, auto);
17+
margin-bottom: 4px;
1618
}
1719

1820
code {
@@ -25,13 +27,13 @@ code {
2527

2628
pre > code[class*='language-'],
2729
pre[class*='language-'] {
28-
font-size: 1.4rem !important;
30+
font-size: calc(var(--code-font-size) - 0.2rem) !important;
2931
line-height: 1.2;
3032
}
3133

3234
@media screen and (min-width: 768px) {
3335
pre > code[class*='language-'],
3436
pre[class*='language-'] {
35-
font-size: 1.8rem !important;
37+
font-size: var(--code-font-size) !important;
3638
}
3739
}

packages/client/assets/style/common.css

-210
This file was deleted.

packages/client/assets/style/customize.css

+10-4
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
}
88

99
.qr {
10-
width: 320px;
11-
height: 320px;
10+
width: var(--qr-code-image-size);
11+
height: var(--qr-code-image-size);
1212
margin: 0 auto;
1313
}
1414

1515
.swiper-container {
16-
background: #f5f5f5;
1716
height: 100vh;
1817
width: 100%;
1918
}
@@ -26,10 +25,17 @@
2625
overflow-y: auto;
2726
}
2827

28+
.slide-box {
29+
color: var(--base-color);
30+
text-align: var(--base-align);
31+
background: var(--background-color);
32+
}
33+
2934
.slide-internal-box {
35+
background: inherit;
3036
padding: 16px 0;
3137
text-align: inherit;
32-
max-width: 1280px;
38+
max-width: var(--base-max-slide-size);
3339
margin: auto;
3440
min-width: 320px;
3541
width: 90%;

packages/client/assets/style/root.css

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@import 'modern-normalize/modern-normalize.css';
2+
@import 'swiper/swiper.min.css';
3+
@import 'swiper/components/a11y/a11y.min.css';
4+
@import './variables.css';
5+
@import './tags.css';
6+
@import './typography.css';
7+
@import './sidebar.css';
8+
@import './grid.css';
9+
@import './customize.css';

0 commit comments

Comments
 (0)