Skip to content

Commit 2144908

Browse files
committed
Modify markdown styles.
1 parent e4d2da2 commit 2144908

File tree

4 files changed

+84
-136
lines changed

4 files changed

+84
-136
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
2+
.hljs {
3+
.comment {
4+
color: #6a737d;
5+
}
6+
.keyword {
7+
color: #d73a49;
8+
}
9+
.attr {
10+
color: #032f62;
11+
}
12+
.string {
13+
color: #032f62;
14+
}
15+
.class {
16+
.keyword {
17+
color: #d73a49;
18+
}
19+
.title {
20+
color: #6f42c1;
21+
}
22+
.title {
23+
color: #6f42c1;
24+
}
25+
}
26+
.tag {
27+
.name {
28+
color: #22863a;
29+
}
30+
.attr {
31+
color: #6f42c1;
32+
}
33+
}
34+
}
35+
36+
.hljs {
37+
.selector-tag {
38+
color: #22863a;
39+
}
40+
.selector-class {
41+
color: #6f42c1;
42+
}
43+
.selector-pseudo {
44+
font-weight: bold;
45+
}
46+
.attribute {
47+
color: #005cc5;
48+
}
49+
.number {
50+
color: #005cc5;
51+
}
52+
}

website/components/Markdown/styles/index.less

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
.markdown {
32
font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;
43
font-size: 14px;
@@ -16,11 +15,7 @@
1615
margin-bottom: 0 !important
1716
}
1817
:global {
19-
@import "./default.less";
20-
// @import "./xml.less";
21-
// @import "./swift.less";
22-
// @import "./diff.less";
23-
// @import "./css.less";
24-
@import "./javascript.less";
18+
@import "./hljs.less";
19+
@import "./markdown.less";
2520
}
2621
}

website/components/Markdown/styles/javascript.less

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 30 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
1+
12
code {
23
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
34
word-wrap: normal;
45
}
5-
code:not(.hljs){
6-
padding: 0.2em 0.4em 0.08em 0.4em;
7-
margin: 0;
8-
font-size: 85%;
9-
background-color: rgba(64, 95, 125, 0.26);
10-
border-radius: 3px;
11-
}
12-
// code.hljs {
13-
// padding: 16px;
14-
// font-size: 95%;
15-
// line-height: 1.5;
16-
// display: block;
17-
// text-shadow: 0 1px #fff;
18-
// }
6+
197
pre code {
208
padding: 16px;
219
font-size: 95%;
@@ -26,17 +14,18 @@ pre code {
2614
pre {
2715
margin-bottom: 18px;
2816
max-height: 35em;
17+
font-size: 85%;
18+
line-height: 1.45;
2919
position: relative;
3020
overflow: auto;
31-
background-color: #F0F0F0;
21+
background-color: #f6f8fa;
3222
border-radius: 3px;
3323
}
3424
del {
3525
color: #888;
3626
}
3727
pre code {
3828
background: none;
39-
font-size: 1em;
4029
overflow-wrap: normal;
4130
white-space: inherit;
4231
}
@@ -69,33 +58,6 @@ p, ol, ul {
6958
li {
7059
display: list-item;
7160
}
72-
table {
73-
margin-bottom: 16px;
74-
}
75-
blockquote {
76-
margin: 0;
77-
padding: 0 1em;
78-
margin-bottom: 10px;
79-
color: #6a737d;
80-
border-left: 0.25em solid #dfe2e5;
81-
& >:first-child {
82-
margin-top: 0;
83-
}
84-
& >:last-child {
85-
margin-bottom: 0;
86-
}
87-
}
88-
hr {
89-
height: 0.25em;
90-
padding: 0;
91-
margin: 24px 0;
92-
background-color: #e1e4e8;
93-
border: 0;
94-
}
95-
96-
h1 tt,h1 code,h2 tt,h2 code,h3 tt,h3 code,h4 tt,h4 code,h5 tt,h5 code,h6 tt,h6 code {
97-
font-size: inherit
98-
}
9961

10062
h1 {
10163
padding-bottom: 0.3em;
@@ -132,7 +94,31 @@ h6 {
13294
color: #6a737d
13395
}
13496

97+
blockquote {
98+
margin: 0;
99+
padding: 0 1em;
100+
margin-bottom: 10px;
101+
color: #6a737d;
102+
border-left: 0.25em solid #dfe2e5;
103+
& >:first-child {
104+
margin-top: 0;
105+
}
106+
& >:last-child {
107+
margin-bottom: 0;
108+
}
109+
}
110+
111+
hr {
112+
height: 0.25em;
113+
padding: 0;
114+
margin: 24px 0;
115+
background-color: #e1e4e8;
116+
border: 0;
117+
}
118+
119+
135120
table {
121+
margin-bottom: 16px;
136122
border-collapse: collapse;
137123
border-spacing: 0;
138124
width: 100%;
@@ -174,55 +160,4 @@ img[align=right] {
174160

175161
img[align=left] {
176162
padding-right: 20px;
177-
}
178-
179-
.comment,.quote{
180-
color:#998;
181-
}
182-
.keyword,.selector-tag,.subst{
183-
color:#333;font-weight:bold;
184-
}
185-
.number,.literal,.variable,.template-variable,.tag .attr{
186-
color:#008080;
187-
}
188-
.string,.doctag{
189-
color:#d14;
190-
}
191-
.title,.section,.selector-id{
192-
color:#900;font-weight:bold;
193-
}
194-
.subst{
195-
font-weight:normal;
196-
}
197-
.type,.class .title{
198-
color:#458;font-weight:bold;
199-
}
200-
.tag,.name,.attribute{
201-
color:#000098;
202-
font-weight:normal;
203-
}
204-
.regexp,.link{
205-
color:#009926;
206-
}
207-
.symbol,.bullet{
208-
color:#990073;
209-
}
210-
.built_in,.builtin-name{
211-
color:#0086b3;
212-
}
213-
.meta{
214-
color:#999;font-weight:bold;
215-
}
216-
.deletion{
217-
background:#fdd;
218-
}
219-
.addition{
220-
background:#dfd;
221-
}
222-
.emphasis{
223-
font-style:italic;
224-
}
225-
.strong{
226-
font-weight:bold;
227-
}
228-
163+
}

0 commit comments

Comments
 (0)