-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsiyuan.css
619 lines (536 loc) · 13.7 KB
/
siyuan.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
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
@charset "UTF-8";
:root {
/* == 字体设置 == */
/* 基准字体 */
/* 备选:Times, "Times New Roman" */
--base-Latin-font: "思源黑体";
--base-Chinese-font: "思源黑体";
--base-font-size: 9.5pt;
/* 引言字体 */
--quote-font: "思源黑体";
/* 这里字体用了10pt,比正文字体稍大 */
--quote-font-size: 10pt;
/* 代码字体(代码中的中文会调用 ui-font) */
--code-font: "Monaco", "Consolas";
/* 侧边栏字体 */
--ui-font: "思源黑体";
/* source mode 字体 */
/* 默认调用 code-font 和 ui-font */
--sourceMode-font: "SF Mono", "思源黑体";
/* 目录字体 */
/* 默认调用 base-font */
--toc-font: "";
/* 默认调用 base-font-size */
--toc-font-size: "";
/* 表格字体 */
/* 默认调用 heading-font */
--table-title-font: "";
/* 默认调用 base-font */
--table-font: "";
/* 标题字体(总设置) */
/* 注意,如果您使用macOS系统并更改了英文字体,请在此处更换标题英文字体粗体字重的postscript值 */
--heading-Latin-font: "思源黑体";
--heading-Chinese-font: "思源黑体";
/* 标题字体分别设置 */
/* 大标题(h1)字体 */
--title-Chinese-font: "思源黑体";
--title-font-size: 18pt;
/* h2字体 */
--h2-Chinese-font: "思源黑体";
--h2-font-size: 14pt;
/* h3字体 */
--h3-Chinese-font: "思源黑体";
--h3-font-size: 12pt;
/* h4字体 */
--h4-Chinese-font: "思源黑体";
--h4-font-size: 10pt;
/* h5字体 */
--h5-Chinese-font: "思源黑体";
--h5-font-size: 10pt;
/* h6字体 */
--h6-Chinese-font: "思源黑体";
--h6-font-size: 9.5pt;
/* 粗体样式设置 */
/* 加粗风格时使用的字重;400等同于 normal,700等同于 bold,900等同于 heavy */
--strong-weight: 900;
/* 基础行距 */
--base-line-height: 16pt;
/* == 页面设置 == */
/* 打印页边距 */
--set-margin: 1.8cm 2cm 1.2cm 2cm !important;
/* == 控制设置 == */
/* 目录中是否显示一级标题 */
--toc-show-title: none;
/* == 颜色设置 == */
/* 超链接颜色 */
--link-color-light: #2E67D3;
--link-color-dark: #8bb1f9;
}
/* ========== VERY IMPORTANT 请注意看下面的几行: ================
如果您需要在输出PDF时隐藏超链接的颜色和下划线,请取消注释下面的代码块,即删去下面的 Ln.1 和 Ln.2
如果您需要在输出PDF时保持超链接的显示效果,则不用更改 ============= */
/* 如要取消注释代码,请把本行删去 Ln.1
@media print {
#write a {
color: inherit !important;
text-decoration: none;
}
}
如要取消注释代码,请把本行删去 Ln.2 */
body {
padding: 0 !important;
margin: 0 !important;
line-height: var(--base-line-height);
font-family: "思源黑体";
/* font-weight: 900; */
/* text-indent: 2em; */
/* counter-reset: tableHead 0 imgHead 0; */
}
strong {
font-weight: var(--strong-weight);
}
/*
根据宽度适应手机页面
*/
@media screen and (min-width: 500px) {
#write {
padding: var(--set-margin);
/* 添加一个淡蓝色的边框 */
/* border: 0.8px solid #AAC ; */
/* 页边阴影 */
box-shadow: 0 0 24px 12px #cccccc;
}
}
@media screen and (max-width: 500px) {
#write {
padding: 0.5cm 0.3cm 0.5cm 0.3cm !important;
}
}
@media print {
#write {
padding: 0 !important;
}
@page {
margin: 1.8cm 2cm 1.2cm 2cm !important;
/* 页边距 */
}
}
/* 正文区基本属性 */
#write {
font-family: var(--base-Latin-font), var(--base-Chinese-font), sans-serif;
font-size: var(--base-font-size);
/* A4标准宽度 */
max-width: 21cm;
background-color: white;
/* column-count: 2;
column-gap: 25px;
column-width: 8cm;
display: inline-block; */
/* 这里可以试分栏的,但确实不适合实现 */
counter-reset: h2 0 h3 0 h4 0 h5 0 h6 0;
}
#write p {
text-align: left;
}
#write a {
color: var(--link-color-light);
}
#write h1,
#write h2,
#write h3,
#write h4,
#write h5,
#write h6 {
font-weight: normal;
/* 标题字体 */
font-family: var(--heading-Latin-font), var(--heading-Chinese-font), sans-serif;
page-break-after: avoid !important;
}
#write h1 {
font-family: var(--heading-Latin-font), var(--title-Chinese-font), sans-serif;
font-weight: normal;
text-align: center;
column-span: all;
font-size: var(--title-font-size);
font-weight: 700;
}
#write h2 {
font-family: var(--heading-Latin-font), var(--h2-Chinese-font), sans-serif;
font-size: var(--h2-font-size);
font-weight: 700;
}
#write h3 {
font-family: var(--heading-Latin-font), var(--h3-Chinese-font), sans-serif;
font-size: var(--h3-font-size);
line-height: var(--h3-font-size);
}
#write h4 {
font-family: var(--heading-Latin-font), var(--h4-Chinese-font), sans-serif;
font-size: var(--h4-font-size);
line-height: var(--h4-font-size);
}
#write h5 {
font-family: var(--heading-Latin-font), var(--h5-Chinese-font), sans-serif;
font-size: var(--h5-font-size);
line-height: var(--h5-font-size);
}
#write h6 {
font-family: var(--heading-Latin-font), var(--h6-Chinese-font), sans-serif;
font-size: var(--h6-font-size);
/* 没有写错,为了避免行距太小才这么写 */
line-height: var(--h5-font-size);
}
#write table {
/* 三线表第一条线宽度 */
border-top: 1.2pt solid;
/* 三线表第二条线宽度 */
border-bottom: 1.2pt solid;
font-family: var(--table-font), var(--base-Latin-font), var(--base-Chinese-font), sans-serif;
/* font-size: var(--base-font-size); */
text-align: center;
page-break-inside: avoid;
border-spacing: 6px;
/* 自动布局表格宽度,如果有时内容太紧建议直接加空格吧,我自己看不惯和页面等宽的大表格 */
width: auto;
/* 使表格默认居中;虽然这个代码不好,但好像没别的实现办法 */
margin: 0 auto;
}
#write table td {
padding: 2px;
}
#write table tr {
padding: 2px;
}
#write th {
padding: 0px 6px;
}
#write thead {
/* 表格标题(首行)样式 */
/* 三线表表头的线 */
border-bottom: 0.5pt solid;
font-family: var(--table-title-font), var(--heading-Latin-font), var(--heading-Chinese-font), sans-serif !important;
/* font-size: var(--base-font-size); */
font-weight: var(--strong-weight);
}
#write .CodeMirror-wrap {
padding: 10px;
}
#write .CodeMirror-code pre {
font-family: var(--code-font), var(--ui-font), monospace;
line-height: 120%;
}
#write h1 {
counter-reset: h2;
}
#write h2 {
counter-reset: h3;
}
#write h3 {
counter-reset: h4;
}
#write h4 {
counter-reset: h5;
}
#write h5 {
counter-reset: h6;
}
/*
#write figure:after{
counter-increment: tableHead;
content: "表" counter(tableHead) " ";
text-align:center;
width:100%;
display:inline-block;
}*/
/* 图片,导出PDF时暂时无法显示 */
/*
#write .md-image:after{
counter-increment: imgHead;
content: "图" counter(imgHead) " ";
text-align:center;
width:100%;
display:inline-block;
}
*/
/* basic 样式采用一般的引言,具有左边框、左缩进 */
blockquote {
font-style: normal;
font-family: var(--quote-font), var(--base-Latin-font), var(--base-Chinese-font), -apple-system, sans-serif;
font-size: var(--quote-font-size);
/* 文字离左边框的距离 */
padding-left: 16px;
padding-right: 20pt;
/* 左边框离页面边的距离 */
margin-left: 20px;
}
hr {
border-top: solid 0.7px #eee;
}
img {
/* 避免图片在导出时被断开 */
page-break-inside: avoid;
}
/* ============ 多级列表样式 ============ */
ul {
/* 无序列表第一级:实心圆点 */
list-style: disc;
}
ul ul {
/*list-style: circle;*/
/* 请勿删除“–”后的空格, 他们对缩进有一定影响, 下同 */
list-style: "– ";
/*left: -0.8rem;*/
}
ul ul ul {
/* 无序列表第三极:小圈 */
list-style: "◦ ";
left: 0.1rem;
}
ol {
/* 有序列表第一级:数字 */
list-style: decimal;
}
ol ol {
counter-reset: liist;
list-style: none;
}
ol ol li {
counter-increment: liist;
position: relative;
}
ol ol li::before {
/* 有序列表第二级:括号加小写字母 */
content: "(" counter(liist, lower-alpha) ") ";
position: absolute;
margin-right: 2rem;
left: -2.4rem;
}
ol ol ol {
counter-reset: liiist;
list-style: none;
margin: 0;
}
ol ol ol li {
counter-increment: liiist;
position: relative;
}
ol ol ol li::before {
/* 有序列表第三级:小写罗马数字 */
content: counter(liiist, lower-roman) ". ";
align-self: flex-end;
position: absolute;
left: -3rem;
/* -moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;*/
/* 为了让项目编号是重新用句点对齐而不是左对齐 */
width: 4.2rem;
text-align: right;
}
li {
position: relative;
}
/* ============ 多级列表样式END ============ */
/* 行内代码 */
code {
font-family: var(--code-font), var(--ui-font), monospace;
}
h1 code,
h2 code,
h3 code,
h4 code,
h5 code,
h6 code,
p code,
li code {
color: #111111;
background-color: #fefefe;
font-family: var(--code-font), var(--ui-font), monospace;
box-sizing: border-box;
border-right: 0px;
/* border-style: solid; */
margin: 0 0px 0 0px;
padding: 0 1px 0 1px;
/* 圆角 */
/* border-radius: 2px 2px 2px 2px; */
}
/* typora 编写模式 */
#typora-source {
font-family: var(--sourceMode-font), var(--code-font), var(--ui-font), monospace;
line-height: 2rem;
}
#write h2:before {
counter-increment: h2;
content: counter(h2);
margin-right: 2rem;
}
#write h3:before,
h3.md-focus.md-heading:before {
counter-increment: h3;
content: counter(h2) "." counter(h3);
margin-right: 2rem;
}
#write h4:before,
h4.md-focus.md-heading:before {
counter-increment: h4;
content: counter(h2) "." counter(h3) "." counter(h4);
margin-right: 2rem;
}
#write h5:before,
h5.md-focus.md-heading:before {
counter-increment: h5;
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5);
margin-right: 2rem;
}
#write h6:before,
h6.md-focus.md-heading:before {
counter-increment: h6;
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6);
margin-right: 2rem;
}
.footnotes-area .footnote-line {
color: var(--text-color);
font-size: var(--base-font-size);
}
.footnotes-area hr {
border: 0;
color: #00000000;
}
/* 目录 */
.md-toc-content {
margin-left: 2em;
/* 修复缺失上级标题时无法递增 */
counter-reset: toc-h2 toc-h3 toc-h4;
page-break-after: always;
}
.md-toc-inner {
margin-left: 0 !important;
color: var(--text-color) !important;
}
.md-toc-item {
color: var(--text-color) !important;
}
/* 目录标题内容属性 */
.md-toc-h2,
.md-toc-h3,
.md-toc-h4,
.md-toc-h5,
.md-toc-h6 {
font-size: var(--toc-font-size);
font-family: var(--toc-font), var(--base-Latin-font), var(--base-Chinese-font), sans-serif;
}
.md-toc-h2 {
font-weight: var(--strong-weight);
}
/* 目录标题前 */
.md-toc-content .md-toc-h1 {
display: var(--toc-show-title);
counter-reset: toc-h2;
}
.md-toc-content .md-toc-h2 {
counter-reset: toc-h3;
}
.md-toc-content .md-toc-h3 {
counter-reset: toc-h4;
}
.md-toc-content .md-toc-h4 {
counter-reset: toc-h5;
}
.md-toc-content .md-toc-h5 {
counter-reset: toc-h6;
}
.md-toc-content .md-toc-h2:before {
counter-increment: toc-h2;
content: counter(toc-h2);
margin-right: 1rem;
font-weight: var(--strong-weight);
}
.md-toc-content .md-toc-h3:before {
counter-increment: toc-h3;
content: counter(toc-h2) "." counter(toc-h3);
margin-left: 1.5rem;
margin-right: 0.5rem;
}
.md-toc-content .md-toc-h4:before {
counter-increment: toc-h4;
content: counter(toc-h2) "." counter(toc-h3) "." counter(toc-h4);
margin-left: 3.5rem;
margin-right: 0.5rem;
}
.md-toc-content .md-toc-h5:before {
counter-increment: toc-h5;
content: counter(toc-h2) "." counter(toc-h3) "." counter(toc-h4) "." counter(toc-h5);
margin-left: 5.5rem;
margin-right: 0.5rem;
}
.md-toc-content .md-toc-h6:before {
counter-increment: toc-h6;
content: counter(toc-h2) "." counter(toc-h3) "." counter(toc-h4) "." counter(toc-h5) "." counter(toc-h6);
margin-left: 7.5rem;
margin-right: 0.5rem;
}
/* 侧边大纲标题 */
.sidebar-content .outline-h1 {
counter-reset: outline-h2;
}
.sidebar-content .outline-h2 {
counter-reset: outline-h3;
}
.sidebar-content .outline-h2 .outline-label:before {
counter-increment: outline-h2;
content: counter(outline-h2) " ";
}
.sidebar-content .outline-h3 {
counter-reset: outline-h4;
}
.sidebar-content .outline-h3 .outline-label:before {
counter-increment: outline-h3;
content: counter(outline-h2) "." counter(outline-h3) " ";
}
.sidebar-content .outline-h4 {
counter-reset: outline-h5;
}
.sidebar-content .outline-h4 .outline-label:before {
counter-increment: outline-h4;
content: counter(outline-h2) "." counter(outline-h3) "." counter(outline-h4) " ";
}
.sidebar-content .outline-h5 {
counter-reset: outline-h6;
}
.sidebar-content .outline-h5 .outline-label:before {
counter-increment: outline-h5;
content: counter(outline-h2) "." counter(outline-h3) "." counter(outline-h4) "." counter(outline-h5) " ";
}
.sidebar-content {
/* 侧边栏的字体修改 */
font-family: var(--ui-font);
list-style: none;
}
/* 元数据(如 YAML front matter)的背景框 */
pre.md-meta-block {
background: #cccccc;
padding: 1.4em;
font-family: var(--code-font), var(--ui-font), monospace;
}
#write>h3.md-focus:before,
#write>h4.md-focus:before,
#write>h5.md-focus:before,
#write>h6.md-focus:before,
h3.md-focus:before,
h4.md-focus:before,
h5.md-focus:before,
h6.md-focus:before {
color: inherit;
border: inherit;
border-radius: inherit;
position: inherit;
left: initial;
float: none;
top: initial;
font-size: inherit;
padding-left: inherit;
padding-right: inherit;
vertical-align: inherit;
font-weight: inherit;
line-height: inherit;
}