Skip to content

Commit d1d6a99

Browse files
author
elonz
committed
add: typora lark 主题
Change-Id: Ia81dec5c30e40c9b4bd57962cde7d54e3581d6ac
1 parent c1235be commit d1d6a99

File tree

4 files changed

+401
-0
lines changed

4 files changed

+401
-0
lines changed

src/themes/core/typora.scss

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
// core/base.scss 中的 .markdown-body 换成 #write
2+
3+
#write {
4+
font-family: $font-family;
5+
font-size: $font-size;
6+
color: $font-color;
7+
}
8+
9+
#write {
10+
background-color: $body-bg-color;
11+
}
12+
13+
#write {
14+
line-height: $line-height;
15+
-webkit-text-size-adjust: 100%;
16+
max-width: $md-body-max-width;
17+
margin: $md-body-mg-v $md-body-mg-h;
18+
padding: $md-body-pd-v $md-body-pd-h;
19+
20+
* {
21+
-moz-box-sizing: border-box;
22+
-webkit-box-sizing: border-box;
23+
box-sizing: border-box
24+
}
25+
26+
> *:first-child {
27+
margin-top: 0 !important;
28+
}
29+
30+
> *:last-child {
31+
margin-top: 0 !important;
32+
}
33+
34+
/* spacing */
35+
36+
p, details, dl, ol, ul, xmp, plaintext, listing, blockquote, table, figure, hr {
37+
margin-top: $block-mg-t;
38+
margin-bottom: $block-mg-b;
39+
}
40+
41+
/* block */
42+
43+
h1 {
44+
font-size: $h1-font-size;
45+
font-weight: $h1-font-weight;
46+
margin-top: $h1-mg-t;
47+
margin-bottom: $h1-mg-b;
48+
margin-left: 0;
49+
margin-right: 0;
50+
}
51+
52+
h2 {
53+
font-size: $h2-font-size;
54+
font-weight: $h2-font-weight;
55+
margin-top: $h2-mg-t;
56+
margin-bottom: $h2-mg-b;
57+
margin-left: 0;
58+
margin-right: 0;
59+
}
60+
61+
h3 {
62+
font-size: $h3-font-size;
63+
font-weight: $h3-font-weight;
64+
margin-top: $h3-mg-t;
65+
margin-bottom: $h3-mg-b;
66+
margin-left: 0;
67+
margin-right: 0;
68+
}
69+
70+
h4 {
71+
font-size: $h4-font-size;
72+
font-weight: $h4-font-weight;
73+
margin-top: $h4-mg-t;
74+
margin-bottom: $h4-mg-b;
75+
margin-left: 0;
76+
margin-right: 0;
77+
}
78+
79+
h5 {
80+
font-size: $h5-font-size;
81+
font-weight: $h5-font-weight;
82+
margin-top: $h5-mg-t;
83+
margin-bottom: $h5-mg-b;
84+
margin-left: 0;
85+
margin-right: 0;
86+
}
87+
88+
h6 {
89+
font-size: $h6-font-size;
90+
font-weight: $h6-font-weight;
91+
margin-top: $h6-mg-t;
92+
margin-bottom: $h6-mg-b;
93+
margin-left: 0;
94+
margin-right: 0;
95+
}
96+
97+
p {
98+
margin-left: 0;
99+
margin-right: 0;
100+
}
101+
102+
pre, xmp, plaintext, listing {
103+
font-family: $code-font-family;
104+
}
105+
106+
blockquote {
107+
>:first-child {
108+
margin-top: 0;
109+
}
110+
111+
>:last-child {
112+
margin-bottom: 0;
113+
}
114+
}
115+
116+
hr {
117+
border-style: $hr-bd-style;
118+
border-width: $hr-bd-width;
119+
}
120+
121+
img {
122+
max-width: 100%;
123+
height: auto
124+
}
125+
126+
/* list */
127+
128+
li {
129+
word-wrap: break-all;
130+
}
131+
132+
li+li {
133+
margin-top: $li-mg-t;
134+
}
135+
136+
ul ul, ol ul, ul ol, ol ol {
137+
margin-top: 0;
138+
margin-bottom: 0;
139+
}
140+
141+
.task-list-item {
142+
list-style-type: none;
143+
}
144+
145+
/* inline */
146+
147+
a {
148+
color: $link-color;
149+
text-decoration: $link-decoration;
150+
}
151+
152+
a img {
153+
border: none
154+
}
155+
156+
b, strong {
157+
font-weight: $bold-font-weight;
158+
}
159+
160+
i, cite, em, var, address, dfn {
161+
font-style: $italic-font-style;
162+
}
163+
164+
code, kbd, tt, samp {
165+
font-family: $code-font-family;
166+
}
167+
168+
mark {
169+
background-color: $mark-bg-color;
170+
}
171+
172+
del, s {
173+
color: $del-font-color;
174+
}
175+
176+
/* table */
177+
178+
table {
179+
color: $table-font-color;
180+
border-collapse: collapse;
181+
background-color: $table-bg-color;
182+
border-spacing: $table-border-spacing;
183+
font-size: $table-font-size;
184+
}
185+
186+
th, td {
187+
border-color: $border-color;
188+
border-width: $table-border-width;
189+
border-style: $table-border-style;
190+
}
191+
192+
th {
193+
padding: $th-pd-v $th-pd-h;
194+
font-size: $th-font-size;
195+
font-weight: $th-font-weight;
196+
}
197+
198+
td {
199+
padding: $td-pd-v $td-pd-h;
200+
font-size: $td-font-size;
201+
font-weight: $td-font-weight;
202+
}
203+
204+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@import "typora-lark.scss";
2+
3+
#write {
4+
5+
strong {
6+
color: $accent-color; // 这是一个可选的样式,我认为颜色比单纯加粗要更醒目一些
7+
}
8+
9+
}

0 commit comments

Comments
 (0)