Skip to content

Commit b49c2f5

Browse files
committed
style: CodeMirror - update styles
1 parent af73d9c commit b49c2f5

File tree

2 files changed

+44
-8
lines changed

2 files changed

+44
-8
lines changed

src/Common/CodeMirror/CodeEditor.theme.ts

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,42 @@ export const getCodeEditorTheme = (isDark: boolean) => {
2222
const themeInit = isDark ? githubDarkInit : githubLightInit
2323
const styles = isDark
2424
? [
25-
{ tag: [t.className, t.propertyName], color: 'var(--code-editor-property-name)' },
26-
{ tag: [t.variableName, t.attributeName, t.number, t.operator], color: 'var(--code-editor-number)' },
27-
{ tag: [t.heading, t.strong], color: 'var(--code-editor-property-name)', fontWeight: 'bold' },
28-
{ tag: [t.emphasis], color: 'var(--code-editor-property-name)', fontStyle: 'italic' },
29-
{ tag: [t.atom, t.bool, t.special(t.variableName)], color: 'var(--code-editor-boolean)' },
25+
{
26+
tag: [t.className, t.propertyName],
27+
color: 'var(--code-editor-property-name)',
28+
},
29+
{
30+
tag: [t.variableName, t.attributeName, t.number, t.operator],
31+
color: 'var(--code-editor-number)',
32+
},
33+
{
34+
tag: [t.heading, t.strong],
35+
color: 'var(--code-editor-property-name)',
36+
fontWeight: 'bold',
37+
},
38+
{
39+
tag: [t.emphasis],
40+
color: 'var(--code-editor-property-name)',
41+
fontStyle: 'italic',
42+
},
43+
{
44+
tag: [t.atom, t.bool, t.special(t.variableName)],
45+
color: 'var(--code-editor-boolean)',
46+
},
3047
]
3148
: [
32-
{ tag: [t.className, t.propertyName], color: 'var(--code-editor-property-name)' },
33-
{ tag: [t.variableName, t.attributeName, t.number, t.operator], color: 'var(--code-editor-number)' },
34-
{ tag: [t.atom, t.bool, t.special(t.variableName)], color: 'var(--code-editor-boolean)' },
49+
{
50+
tag: [t.className, t.propertyName],
51+
color: 'var(--code-editor-property-name)',
52+
},
53+
{
54+
tag: [t.variableName, t.attributeName, t.number, t.operator],
55+
color: 'var(--code-editor-number)',
56+
},
57+
{
58+
tag: [t.atom, t.bool, t.special(t.variableName)],
59+
color: 'var(--code-editor-boolean)',
60+
},
3561
]
3662

3763
return {

src/Common/CodeMirror/codeEditor.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@
6060
.cm-deletedChunk .cm-deletedText {
6161
background: var(--bg-code-editor-red-highlight);
6262
border-radius: 4px;
63+
padding: 0 2px;
64+
color: var(--N900);
65+
> span {
66+
color: var(--N900);
67+
}
6368
}
6469

6570
&.cm-merge-a .cm-changedLineGutter {
@@ -73,6 +78,11 @@
7378
&.cm-merge-b .cm-changedText {
7479
background: var(--bg-code-editor-green-highlight);
7580
border-radius: 4px;
81+
padding: 0 2px;
82+
color: var(--N900);
83+
> span {
84+
color: var(--N900);
85+
}
7686
}
7787

7888
&.cm-merge-b .cm-changedLineGutter {

0 commit comments

Comments
 (0)