-
Notifications
You must be signed in to change notification settings - Fork 0
/
basic.css
389 lines (350 loc) · 12.5 KB
/
basic.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
.theme-light {
/* 强调色 */
--accent-h: 31;
--accent-s: 95%;
--accent-l: 60%;
/* 背景色 */
--background-primary: #ffffff;
--background-secondary: #f8f8f8;
--background-secondary-alt: #ffffff;
--border-color: #bbb;
--link-color: #333;
--link-color-hover: #888;
--text-normal: #000000;
}
.theme-dark {
/* 强调色 */
--accent-h: 190;
--accent-s: 95%;
--accent-l: 60%;
--background-secondary: #262626;
--link-color: #dcdcdc;
--link-color-hover: #999;
--border-color: #bbb;
}
/* 全局变量设置 */
body {
--radius-s: 4px;
/* 标题 */
--h1-size: 2.00em;
--h2-size: 1.50em;
--h3-size: 1.25em;
--h4-size: 1.00em;
/* 列表 */
--list-indent: 2em; /* 列表缩进 */
--list-spacing: 0.1em; /* 列表间距 */
/* 字体设置 */
--font-text: 'LXGW Bright', 'JetBrains Mono', 'LXGW WenKai Screen', '霞鹜文楷 屏幕阅读版';
--font-monospace: 'JetBrains Mono', 'LXGW WenKai Screen', '霞鹜文楷 屏幕阅读版';
--font-quote: 'Source Serif 4', 'STKaiti';
--font-accent: 'Source Serif 4', 'Source Han Serif SC';
/* 链接 */
--link-unresolved-filter: opacity(50%);
/* 代码 */
--inline-code-weight: 400;
--block-code-weight: 300;
--external-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke-width='2' stroke-linecap='round' stroke='grey' %3E%3Cpath d='M18.668 13.332l-5.336 5.336' stroke-linejoin='round' stroke-width='2'/%3E%3Cpath d='M21.332 17.332L24 14.668A4.718 4.718 0 0 0 24 8a4.718 4.718 0 0 0-6.668 0l-2.664 2.668m-4 4L8 17.332A4.718 4.718 0 0 0 8 24a4.718 4.718 0 0 0 6.668 0l2.664-2.668' stroke-width='2.66666'/%3E%3C/g%3E%3C/svg%3E");
--dblp-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' id='dblp'%3E%3Cpath fill='%232E7FCA' d='m11.969 7.81-.616-2.28.616 2.28zM5.754 10.365a.733.733 0 0 1-.333-.441l-.607-2.279-1.916.898a.734.734 0 0 0-.398.853l2.44 9.151a.734.734 0 0 0 1.019.476l6.073-2.833-.67-2.48-5.608-3.345zm5.599-4.835-.151-.558a.737.737 0 0 0-.331-.438L3.386.049a.336.336 0 0 0-.497.374l1.925 7.221 5.519-2.588a.736.736 0 0 1 1.02.474z'%3E%3C/path%3E%3Cpath fill='%230A4DA5' d='m5.754 10.365 5.606 3.345-1.187-4.392a.734.734 0 0 1 .398-.856l1.397-.652-.615-2.28a.734.734 0 0 0-1.019-.473l-5.52 2.588.608 2.279a.734.734 0 0 0 .332.441z'%3E%3C/path%3E%3Cpath fill='%232E7FCA' d='m12.031 16.19.616 2.28-.616-2.28z'%3E%3C/path%3E%3Cpath fill='%23FDD700' d='m21.5 14.604-2.44-9.151a.734.734 0 0 0-1.019-.476L11.969 7.81l.67 2.48 5.606 3.345a.733.733 0 0 1 .333.441l.608 2.279 1.917-.899a.733.733 0 0 0 .397-.852z'%3E%3C/path%3E%3Cpath fill='%232E7FCA' d='m11.361 13.71.67 2.48zM12.639 10.29l-.67-2.48z'%3E%3C/path%3E%3Cpath fill='%2345681B' d='m11.569 9.652 1.07.638-.67-2.48-1.397.652a.734.734 0 0 0-.398.856l1.187 4.392-.875-3.237a.733.733 0 0 1 1.083-.821z'%3E%3C/path%3E%3Cpath fill='%23FDD700' d='m12.647 18.47.151.558c.05.183.168.34.331.438l7.485 4.485a.336.336 0 0 0 .497-.375l-1.925-7.221-5.519 2.588a.735.735 0 0 1-1.02-.473z'%3E%3C/path%3E%3Cpath fill='%23F9BC00' d='M18.246 13.635 12.64 10.29l1.187 4.392a.734.734 0 0 1-.398.856l-1.397.652.616 2.281a.734.734 0 0 0 1.019.473l5.519-2.588-.608-2.279a.733.733 0 0 0-.332-.442z'%3E%3C/path%3E%3Cpath fill='%235A7F19' d='M13.514 13.527a.734.734 0 0 1-1.084.821l-1.07-.638.67 2.48 1.397-.652a.734.734 0 0 0 .398-.856l-1.187-4.392.876 3.237z'%3E%3C/path%3E%3Cpath fill='%232B5A20' d='m13.514 13.527-.875-3.237-1.07-.638a.734.734 0 0 0-1.084.821l.875 3.237 1.07.638a.733.733 0 0 0 1.084-.821z'%3E%3C/path%3E%3C/svg%3E");
--external-link-icon-position: center left;
--external-link-icon-position-y: 0.06em;
--external-link-icon-size: 1.1em;
--external-link-padding-right: 1.25em;
}
/* 圆角设置 */
.search-result-file-match {
border-radius: --radius-s;
}
/* 设置 h1 标题左侧空白 */
div.markdown-reading-view h1 span.custom-heading-count {
padding-right: 0 !important;
}
/* 设置 headings 样式 */
.markdown-rendered h1, .HyperMD-header-1{
/* 居中 */
text-align: center;
/* 字体 */
font-family: var(--font-accent) !important;
}
.markdown-rendered h2, .HyperMD-header-2 {
margin-top: 2.5rem;
/* 居右 */
text-align: right;
/* 标题下划线 */
letter-spacing: -0.75px;
border-bottom: 1px solid var(--border-color);
line-height: 1;
/* 字体设置 */
font-family: var(--font-accent) !important;
}
.markdown-rendered h3, .HyperMD-header-3 {
/* 标题下划线 */
letter-spacing: -0.75px;
border-bottom: 1px solid var(--border-color);
line-height: 1;
/* 字体设置 */
font-family: var(--font-accent) !important;
}
.markdown-rendered h4, .HyperMD-header-4 {
/* 字体 */
font-family: var(--font-accent) !important;
}
.markdown-rendered div:has( > :is(p,pre,table,ul,ol)) + div > :is(h3, h4) {
margin-top: 1rem;
}
/* 文本、列表混排适配 */
/* 缩小段落与列表之间的间距 */
p {
margin-block-end: 0em;
}
ul, ol {
margin-block-start: 0em;
}
/* 缩小 callout 块中的间距 */
.markdown-rendered p{
margin-block-end: 0em;
}
.markdown-rendered ol,
.markdown-rendered ul {
margin-block-start: 0em;
}
/* callout checkbox 对齐问题 */
div.cm-callout div.callout-content ul.contains-task-list {
padding-inline-start: 0em;
}
/* 独立图片居中,限制高度 */
img {
display: block;
margin-left: auto;
margin-right: auto;
max-height: 400px;
}
/* 列表图片左对齐,限制高度 */
.HyperMD-list-line > .image-embed > img,
li img {
margin-left: 0%;
max-height: 200px;
/* width: 50%; */
}
/*** 链接样式 ***/
span.cm-link:hover,
span.cm-url:hover,
span.cm-hmd-internal-link:hover,
a:hover{
color: var(--link-color-hover) !important;
text-decoration: none !important;
text-decoration-line: none !important;
}
span.cm-link,
span.cm-url,
span.cm-hmd-internal-link,
a {
color: var(--link-color) !important;
text-decoration: none !important;
text-decoration-line: none !important;
}
/* 特殊外链-纯链接(http, https 样式设置) */
span.cm-url > a,
a.external-link:not([aria-label]) {
/* 自动图标设置 */
font-family: var(--font-monospace);
font-weight: 200;
font-size: 80%;
padding-left: var(--external-link-padding-right);
background-repeat: no-repeat;
background-position: var(--external-link-icon-position);
background-position-y: var(--external-link-icon-position-y);
background-size: var(--external-link-icon-size);
background-image: var(--external-link-icon);
}
/* []() 外链样式设置 */
span.cm-link > a,
a.external-link[aria-label] {
color: var(--color-base-100);
font-family: var(--font-text);
font-weight: normal;
font-size: 100%;
text-shadow:
0 0.01em var(--background-primary),
0.05em 0.01em var(--background-primary),
-0.05em 0.01em var(--background-primary),
0.10em 0.01em var(--background-primary),
-0.10em 0.01em var(--background-primary),
0.15em 0.01em var(--background-primary),
-0.15em 0.01em var(--background-primary),
0.20em 0.01em var(--background-primary),
-0.20em 0.01em var(--background-primary);
background-image: linear-gradient(currentColor, currentColor);
background-size: 1px 1px;
background-repeat: repeat-x;
background-position: 0% calc(100% - 0.1em);
}
/* DBLP 链接设置 */
/* HACK 只设置了 Reading Mode */
a.external-link[href^="https://dblp.org"] {
margin-left: 0.3em; /* NOTE 设置间距 */
overflow: hidden;
padding-left: var(--external-link-padding-right);
background-repeat: no-repeat;
background-position: var(--external-link-icon-position);
background-position-y: var(--external-link-icon-position-y);
background-size: var(--external-link-icon-size);
background-image: var(--dblp-link-icon);
}
/* 内链样式设置 */
span.cm-hmd-internal-link > a,
a.internal-link {
color: currentColor;
position: relative;
/* NOTE 0.01 为了防止下划线上方的中文字体覆盖下划线 */
text-shadow:
0 0.01em var(--background-primary),
0.05em 0.01em var(--background-primary),
-0.05em 0.01em var(--background-primary),
0.10em 0.01em var(--background-primary),
-0.10em 0.01em var(--background-primary),
0.15em 0.01em var(--background-primary),
-0.15em 0.01em var(--background-primary),
0.20em 0.01em var(--background-primary),
-0.20em 0.01em var(--background-primary);
padding-left: 0.3em;
background-image: linear-gradient(currentColor, currentColor);
background-size: 1px 1px;
background-repeat: repeat-x;
background-position: 0% calc(100% - 0.1em);
}
span.cm-hmd-internal-link > a::before,
a.internal-link::before {
content: "";
position: absolute;
inset: 0 0 0 0;
width: 1px;
height: 1.2em;
background-image: linear-gradient(var(--background-primary), var(--background-primary)),
linear-gradient(var(--background-primary), var(--background-primary)),
linear-gradient(currentColor, currentColor);
background-size: 1px 0.5em, 1px 0.1em, 1px 1.1em;
background-position: 0 0, 0 100%, 0 calc(100% - 0.1em);
background-repeat: no-repeat;
}
.cm-formatting-link-start {
padding-left: var(--internal-link-padding-left);
background-repeat: no-repeat;
background-position: var(--internal-link-icon-position);
background-position-y: var(--internal-link-icon-position-y);
background-size: var(--internal-link-icon-size);
background-image: var(--internal-link-icon);
}
/* NOTE 链接在 Callout 里的样式修正 */
.callout-title-inner > a.external-link[aria-label] {
color: var(--callout-title-color) !important;
background-image: none;
padding-left: 0;
}
/* 取消普通外链默认图标 */
.external-link {
/* background-image: none; */
padding-right: 0px;
}
/* Mathjax 修复 */
mjx-stretchy-h > mjx-ext {
font-weight: 600;
}
/* code 设置 */
:is(h2,h3,h4) code,
.cm-s-obsidian span.cm-inline-code,
.markdown-rendered p code,
.markdown-rendered :is(ul,ol) code {
color: var(--color-accent-2);
font-weight: var(--inline-code-weight);
}
.callout-title-inner code{
color: var(--callout-title-color);
font-weight: var(--inline-code-weight);
}
span.cm-hmd-codeblock,
code {
font-weight: var(--block-code-weight);
}
/* mark 高亮背景设置 */
/*荧光笔高亮 by: Lemonadio*/
/*写着写着就能用了,就不改代码了.*/
.cm-s-obsidian span.cm-formatting-highlight, .cm-s-obsidian span.cm-highlight,
:is(.markdown-preview-view,.markdown-rendered) mark {
display: inline;
box-sizing: border-box;
background-color: inherit;
background-image: linear-gradient(rgba(255,208,0,0.5),rgba(255,208,0,0.5));
background-repeat: no-repeat;
background-size: 100% 50%;
background-position: 100% 53%;
border-radius: 1em;
padding: 0 0.2em;
}
/* tab 栏宽度设置 */
body {
--tab-stacked-pane-width: 100%;
}
/* <blockquote> 样式设置 */
.markdown-rendered blockquote {
display: flow-root;
margin: 1em 0;
padding: 0.75em 2.5em !important;
/* 取消左侧的高亮渲染 */
border-inline-start: none;
}
.HyperMD-quote {
font-size: 0.9rem;
font-family: var(--font-text);
}
.markdown-rendered blockquote > p {
/* 显示规则 */
padding: 0;
border: none;
position: relative;
z-index: 1;
width: fit-content;
margin: auto;
display: flow-root;
/* 字体样式 */
font-family: var(--font-quote);
font-size: 0.9rem;
}
blockquote > p::before {
content: "\201C";
left: -1em;
top: -0.56em;
font-size: 2.5em;
font-family: var(--font-quote);
display: block;
position: absolute;
}
blockquote > p::after {
content: "\201D";
right: -1em;
bottom: -1.12em;
font-size: 2.5em;
font-family: var(--font-quote);
display: block;
position: absolute;
}
/* <cite> 样式设置 */
cite {
font-size: 80%;
font-family: var(--font-quote);
float: right;
font-style: normal;
display: block;
}
/* <kdb> 样式设置 */
kbd {
font-family: 'Courier Prime', Courier, monospace;
font-weight: 500;
border-radius: 0.25rem;
padding: 0.125rem 0.375rem;
border: 1px solid var(--color-accent-2);
box-shadow: 0 3px var(--color-accent-2);
color: var(--text-normal);
background-color: var(--background-primary);
white-space: nowrap;
vertical-align: top;
}