Skip to content

Commit 369908f

Browse files
committed
Fix highlight styles.
1 parent e55eb24 commit 369908f

File tree

2 files changed

+42
-41
lines changed

2 files changed

+42
-41
lines changed
Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,53 @@
1-
.hljs {
2-
.comment {
3-
color: #6a737d;
4-
}
5-
.keyword {
6-
color: #d73a49;
7-
}
8-
.attr {
9-
color: #032f62;
10-
}
11-
.string {
12-
color: #032f62;
13-
}
14-
.class {
1+
:global {
2+
.hljs {
3+
.comment {
4+
color: #6a737d;
5+
}
156
.keyword {
167
color: #d73a49;
178
}
18-
.title {
19-
color: #6f42c1;
9+
.attr {
10+
color: #032f62;
2011
}
21-
.title {
22-
color: #6f42c1;
12+
.string {
13+
color: #032f62;
2314
}
24-
}
25-
.tag {
26-
.name {
27-
color: #22863a;
15+
.class {
16+
.keyword {
17+
color: #d73a49;
18+
}
19+
.title {
20+
color: #6f42c1;
21+
}
22+
.title {
23+
color: #6f42c1;
24+
}
2825
}
29-
.attr {
30-
color: #6f42c1;
26+
.tag {
27+
.name {
28+
color: #22863a;
29+
}
30+
.attr {
31+
color: #6f42c1;
32+
}
3133
}
3234
}
33-
}
3435

35-
.hljs {
36-
.selector-tag {
37-
color: #22863a;
38-
}
39-
.selector-class {
40-
color: #6f42c1;
41-
}
42-
.selector-pseudo {
43-
font-weight: bold;
44-
}
45-
.attribute {
46-
color: #005cc5;
47-
}
48-
.number {
49-
color: #005cc5;
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+
}
5052
}
5153
}

src/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export default class MarkdownEditor extends React.PureComponent<IMarkdownEditor,
4141
<ToolBar toolbars={toolbars} onClick={this.onClick} />
4242
<div className={classnames(`${prefixCls}-content`)}>
4343
<CodeMirror
44-
style={{ width: this.state.preview ? '50%' : '100%' }}
4544
width={this.state.preview ? '50%' : '100%'}
4645
ref={this.getInstance}
4746
{...codemirrorProps}

0 commit comments

Comments
 (0)