DIY Typora 主题记录贴

本文最后更新于:2 分钟前

记录贴,防止以后重装软件时找不到了

css 文件保存位置 Typora\themes,也可以打开偏好设置,在里面寻找

文件—–> 偏好设置 —-> 外观 —–> 打开主题文件夹。

修改里面的 newsprint.css,这是Typora 自带的五种主题之一

效果图:

总的来说就是加了个样式,可以自定义喜欢的图标

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
h1::before {
content: '📚' !important; /* 风车图标 */
}
h2::before {
content: '🍓' !important; /* 风车图标 */
}
h3::before {
content: '📙' !important; /* 风车图标 */
}
h4::before {
content: '📔' !important; /* 风车图标 */
}
h5::before {
content: '📘' !important; /* 风车图标 */
}
h6::before {
content: '📌' !important; /* 风车图标 */
}

修改了 > 空格的样式,默认是灰色,修改后为绿色

1
2
3
4
5
6
blockquote {
border-left: 4px solid #42b983;
padding: 10px 15px;
color: #777;
background-color: rgba(66, 185, 131, .1);
}

白色

1
2
3
4
5
6
blockquote {
border-left: 4px solid #42b983;
padding: 10px 15px;
color: #777;
background-color: white;
}

以下是 完整的css代码(方便以后 copy用~)

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
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
/* meyer reset -- http://meyerweb.com/eric/tools/css/reset/ , v2.0 | 20110126 | License: none (public domain) */

@include-when-export url(https://fonts.loli.net/css?family=PT+Serif:400,400italic,700,700italic&subset=latin,cyrillic-ext,cyrillic,latin-ext);

/* =========== */

/* pt-serif-regular - latin */
@font-face {
font-family: 'PT Serif';
font-style: normal;
font-weight: normal;
src: local('PT Serif'), local('PTSerif-Regular'), url('./newsprint/pt-serif-v11-latin-regular.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* pt-serif-italic - latin */
@font-face {
font-family: 'PT Serif';
font-style: italic;
font-weight: normal;
src: local('PT Serif Italic'), local('PTSerif-Italic'), url('./newsprint/pt-serif-v11-latin-italic.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* pt-serif-700 - latin */
@font-face {
font-family: 'PT Serif';
font-style: normal;
font-weight: bold;
src: local('PT Serif Bold'), local('PTSerif-Bold'), url('./newsprint/pt-serif-v11-latin-700.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* pt-serif-700italic - latin */
@font-face {
font-family: 'PT Serif';
font-style: italic;
font-weight: bold;
src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url('./newsprint/pt-serif-v11-latin-700italic.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
--active-file-bg-color: #dadada;
--active-file-bg-color: rgba(32, 43, 51, 0.63);
--active-file-text-color: white;
--bg-color: #f3f2ee;
--text-color: #1f0909;
--control-text-color: #444;
--rawblock-edit-panel-bd: #e5e5e5;

--select-text-bg-color: rgba(32, 43, 51, 0.63);
--select-text-font-color: white;
}

pre {
--select-text-bg-color: #36284e;
--select-text-font-color: #fff;
}

html {
font-size: 16px;
-webkit-font-smoothing: antialiased;
}

html, body {
background-color: #f3f2ee;
font-family: "PT Serif", 'Times New Roman', Times, serif;
color: #1f0909;
line-height: 1.5em;
}

/*#write {
overflow-x: auto;
max-width: initial;
padding-left: calc(50% - 17em);
padding-right: calc(50% - 17em);
}

@media (max-width: 36em) {
#write {
padding-left: 1em;
padding-right: 1em;
}
}*/

#write {
max-width: 40em;
}

@media only screen and (min-width: 1400px) {
#write {
max-width: 914px;
}
}

ol li {
list-style-type: decimal;
list-style-position: outside;
}
ul li {
list-style-type: disc;
list-style-position: outside;
}

ol,
ul {
list-style: none;
}

blockquote,
q {
quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/* styles */

/* ====== */

/* headings */

h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: bold;
}
h1 {
font-size: 1.875em;
/*30 / 16*/
line-height: 1.6em;
/* 48 / 30*/
margin-top: 2em;
}
mark {
background: rgb(131 232 194);
color: #000;
}
h1::before {
content: '📚' !important; /* 风车图标 */
}
h2::before {
content: '🍓' !important; /* 风车图标 */
}
h3::before {
content: '📙' !important; /* 风车图标 */
}
h4::before {
content: '📔' !important; /* 风车图标 */
}
h5::before {
content: '📘' !important; /* 风车图标 */
}
h6::before {
content: '📌' !important; /* 风车图标 */
}
h2,
h3 {
font-size: 1.3125em;
/*21 / 16*/
line-height: 1.15;
/*24 / 21*/
margin-top: 2.285714em;
/*48 / 21*/
margin-bottom: 1.15em;
/*24 / 21*/
}
h3 {
font-weight: normal;
}
h4 {
font-size: 1.125em;
/*18 / 16*/
margin-top: 2.67em;
/*48 / 18*/
}
h5,
h6 {
font-size: 1em;
/*16*/
}
h1 {
border-bottom: 1px solid;
margin-bottom: 1.875em;
padding-bottom: 0.8125em;
}
/* links */

a {
text-decoration: none;
color: #065588;
}
a:hover,
a:active {
text-decoration: underline;
}
/* block spacing */

p,
blockquote,
.md-fences {
margin-bottom: 1.5em;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-bottom: 1.5em;
}
/* blockquote */

blockquote {
font-style: italic;
border-left: 5px solid;
margin-left: 2em;
padding-left: 1em;
}
/* lists */

ul,
ol {
margin: 0 0 1.5em 1.5em;
}
/* tables */
.md-meta,.md-before, .md-after {
color:#999;
}

table {
margin-bottom: 1.5em;
/*24 / 16*/
font-size: 1em;
/* width: 100%; */
}
thead th,
tfoot th {
padding: .25em .25em .25em .4em;
text-transform: uppercase;
}
th {
text-align: left;
}
td {
vertical-align: top;
padding: .25em .25em .25em .4em;
}

code,
.md-fences {
background-color: #dadada;
}

code {
padding-left: 2px;
padding-right: 2px;
}

.md-fences {
margin-left: 2em;
margin-bottom: 3em;
padding-left: 1ch;
padding-right: 1ch;
}

pre,
code,
tt {
font-size: .875em;
line-height: 1.714285em;
}
/* some fixes */

h1 {
line-height: 1.3em;
font-weight: normal;
margin-bottom: 0.5em;
}

p + ul,
p + ol{
margin-top: .5em;
}

h3 + ul,
h4 + ul,
h5 + ul,
h6 + ul,
h3 + ol,
h4 + ol,
h5 + ol,
h6 + ol {
margin-top: .5em;
}

li > ul,
li > ol {
margin-top: inherit;
margin-bottom: 0;
}

li ol>li {
list-style-type: lower-alpha;
}

li li ol>li{
list-style-type: lower-roman;
}

h2,
h3 {
margin-bottom: .75em;
}
hr {
border-top: none;
border-right: none;
border-bottom: 1px solid;
border-left: none;
}
h1 {
border-color: #c5c5c5;
}
/* blockquote {
border-color: #bababa;
color: #656565;
} */
blockquote {
border-left: 4px solid #42b983;
padding: 10px 15px;
color: #777;
background-color: rgba(66, 185, 131, .1);
}

blockquote ul,
blockquote ol {
margin-left:0;
}

.ty-table-edit {
background-color: transparent;
}
thead {
background-color: #dadada;
}
tr:nth-child(even) {
background: #e8e7e7;
}
hr {
border-color: #c5c5c5;
}
.task-list{
padding-left: 1rem;
}

.md-task-list-item {
padding-left: 1.5rem;
list-style-type: none;
}

.md-task-list-item > input:before {
content: '\221A';
display: inline-block;
width: 1.25rem;
height: 1.6rem;
vertical-align: middle;
text-align: center;
color: #ddd;
background-color: #F3F2EE;
}

.md-task-list-item > input:checked:before,
.md-task-list-item > input[checked]:before{
color: inherit;
}

#write pre.md-meta-block {
min-height: 1.875rem;
color: #555;
border: 0px;
background: transparent;
margin-top: -4px;
margin-left: 1em;
margin-top: 1em;
}

.md-image>.md-meta {
color: #9B5146;
}

.md-image>.md-meta{
font-family: Menlo, 'Ubuntu Mono', Consolas, 'Courier New', 'Microsoft Yahei', 'Hiragino Sans GB', 'WenQuanYi Micro Hei', serif;
}


#write>h3.md-focus:before{
left: -1.5rem;
color:#ff5d52;
border-color:#ff5d52;
}
#write>h4.md-focus:before{
left: -1.5rem;
top: .25rem;
color:#ff5d52;
border-color:#ff5d52;
}
#write>h5.md-focus:before{
left: -1.5rem;
top: .0.3125rem;
color:#ff5d52;
border-color:#ff5d52;
}
#write>h6.md-focus:before{
left: -1.5rem;
top: 0.3125rem;
color:#ff5d52;
border-color:#ff5d52;
}

.md-toc:focus .md-toc-content{
margin-top: 19px;
}

.md-toc-content:empty:before{
color: #065588;
}
.md-toc-item {
color: #065588;
}
#write div.md-toc-tooltip {
background-color: #f3f2ee;
}

#typora-sidebar {
background-color: #f3f2ee;
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.375);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.375);
}

.pin-outline #typora-sidebar {
background: inherit;
box-shadow: none;
border-right: 1px dashed;
}

.pin-outline #typora-sidebar:hover .outline-title-wrapper {
border-left:1px dashed;
}

.outline-item:hover {
background-color: #dadada;
border-left: 28px solid #dadada;
border-right: 18px solid #dadada;
}

.typora-node .outline-item:hover {
border-right: 28px solid #dadada;
}

.outline-expander:before {
content: "\f0da";
font-family: FontAwesome;
font-size:14px;
top: 1px;
}

.outline-expander:hover:before,
.outline-item-open>.outline-item>.outline-expander:before {
content: "\f0d7";
}

.modal-content {
background-color: #f3f2ee;
}

.auto-suggest-container ul li {
list-style-type: none;
}

/** UI for electron */

.megamenu-menu,
#top-titlebar, #top-titlebar *,
.megamenu-content {
background: #f3f2ee;
color: #1f0909;
}

.megamenu-menu-header {
border-bottom: 1px dashed #202B33;
}

.megamenu-menu {
box-shadow: none;
border-right: 1px dashed;
}

header, .context-menu, .megamenu-content, footer {
font-family: "PT Serif", 'Times New Roman', Times, serif;
color: #1f0909;
}

#megamenu-back-btn {
color: #1f0909;
border-color: #1f0909;
}

.megamenu-menu-header #megamenu-menu-header-title:before {
color: #1f0909;
}

.megamenu-menu-list li a:hover, .megamenu-menu-list li a.active {
color: inherit;
background-color: #e8e7df;
}

.long-btn:hover {
background-color: #e8e7df;
}

#recent-file-panel tbody tr:nth-child(2n-1) {
background-color: transparent !important;
}

.megamenu-menu-panel tbody tr:hover td:nth-child(2) {
color: inherit;
}

.megamenu-menu-panel .btn {
background-color: #D2D1D1;
}

.btn-default {
background-color: transparent;
}

.typora-sourceview-on #toggle-sourceview-btn,
.ty-show-word-count #footer-word-count {
background: #c7c5c5;
}

#typora-quick-open {
background-color: inherit;
}

.md-diagram-panel {
margin-top: 8px;
}

.file-list-item-file-name {
font-weight: initial;
}

.file-list-item-summary {
opacity: 1;
}

.file-list-item {
color: #777;
}

.file-list-item.active {
background-color: inherit;
color: black;
}

.ty-side-sort-btn.active {
background-color: inherit;
}

.file-list-item.active .file-list-item-file-name {
font-weight: bold;
}

.file-list-item{
opacity:1 !important;
}

.file-library-node.active>.file-node-background{
background-color: rgba(32, 43, 51, 0.63);
background-color: var(--active-file-bg-color);
}

.file-tree-node.active>.file-node-content{
color: white;
color: var(--active-file-text-color);
}

.md-task-list-item>input {
margin-left: -1.7em;
margin-top: calc(1rem - 12px);
}

input {
border: 1px solid #aaa;
}

.megamenu-menu-header #megamenu-menu-header-title,
.megamenu-menu-header:hover,
.megamenu-menu-header:focus {
color: inherit;
}

.dropdown-menu .divider {
border-color: #e5e5e5;
opacity: 1;
}

/* https://github.com/typora/typora-issues/issues/2046 */
.os-windows-7 strong,
.os-windows-7 strong {
font-weight: 760;
}

.ty-preferences .btn-default {
background: transparent;
}

.ty-preferences .window-header {
border-bottom: 1px dashed #202B33;
box-shadow: none;
}

#sidebar-loading-template, #sidebar-loading-template.file-list-item {
color: #777;
}

.searchpanel-search-option-btn.active {
background: #777;
color: white;
}

本文作者: 仅安
本文链接: https://jinan6.vip/posts/3160666479/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!