Skip to content

Commit 61be6c1

Browse files
committed
优化字体定义
1 parent 780fe9c commit 61be6c1

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

src/editor/import.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,8 @@ function handleImport() {
7575
width: 40vw;
7676
max-width: 500px;
7777
}
78+
.inner-tip {
79+
font-size: 18px;
80+
font-family: var(--font-mono);
81+
}
7882
</style>

src/public.css

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,28 @@
88
-moz-osx-font-smoothing: grayscale;
99
cursor: default;
1010
user-select: none;
11+
12+
--font-base:
13+
"HarmonyOS Sans SC", MiSans, "Noto Sans", "Source Hans Sans", "Segoe UI",
14+
Tahoma, Geneva, Verdana, "Microsoft YaHei UI", sans-serif;
15+
--font-mono:
16+
"Jetbrains Mono", "Source Code Pro", "Sarasa Term SC", Consolas,
17+
"Courier New", monospace;
18+
--font-math: "KaTeX", "Cambria Math", "Times new roman", sans-serif;
1119
}
1220

1321
:root,
1422
input,
1523
select,
1624
button,
1725
textarea {
18-
font-family: "HarmonyOS Sans SC", sans-serif;
26+
font-family: var(--font-base);
1927
}
2028

2129
pre,
2230
input[type="text"],
2331
input[type="number"] {
24-
font-family: "Jetbrains Mono", monospace;
32+
font-family: var(--font-mono);
2533
}
2634

2735
* {
@@ -35,14 +43,14 @@ input[type="number"] {
3543

3644
.styled::part(input),
3745
.styled {
38-
font-family: "KaTeX", "Times new roman";
46+
font-family: var(--font-math);
3947
font-variant-ligatures: common-ligatures discretionary-ligatures contextual
4048
historical-ligatures;
4149
}
4250

4351
.monospace,
4452
.monospace::part(input) {
45-
font-family: "Jetbrains Mono", monospace;
53+
font-family: var(--font-mono);
4654
}
4755

4856
@media (prefers-color-scheme: dark) {

0 commit comments

Comments
 (0)