Просмотр исходного кода

Merge pull request #8431 from weseek/feat/126523-139299-codemirror-default-theme

feat: Change Default CordMirror theme
Yuki Takei 2 лет назад
Родитель
Сommit
01831b26e4

+ 10 - 11
packages/editor/src/services/editor-theme/original-dark.ts

@@ -6,25 +6,24 @@ import { createTheme } from '@uiw/codemirror-themes';
 export const originalDark = createTheme({
   theme: 'dark',
   settings: {
-    background: '#303841',
-    foreground: '#FFFFFF',
-    caret: '#FBAC52',
+    background: '#323132',
+    foreground: '#EFEEED',
     selection: '#4C5964',
     selectionMatch: '#3A546E',
-    gutterBackground: '#303841',
-    gutterForeground: '#FFFFFF70',
-    lineHighlight: '#00000059',
+    gutterBackground: '#393939',
+    gutterForeground: '#6E6D6C',
+    lineHighlight: '#00000030',
   },
   styles: [
     { tag: [t.meta, t.comment], color: '#A2A9B5' },
-    { tag: [t.attributeName, t.keyword], color: '#B78FBA' },
+    { tag: [t.attributeName, t.keyword, t.operator], color: '#9B7F94' },
     { tag: t.function(t.variableName), color: '#5AB0B0' },
-    { tag: [t.string, t.regexp, t.attributeValue], color: '#99C592' },
-    { tag: t.operator, color: '#f47954' },
+    { tag: [t.string, t.attributeValue], color: '#7D9B7B' },
     // { tag: t.moduleKeyword, color: 'red' },
-    { tag: [t.tagName, t.modifier], color: '#E35F63' },
+    { tag: [t.tagName, t.modifier], color: '#BA6666' },
+    { tag: [t.url, t.escape, t.regexp, t.link], color: '#8FA7C7' },
     { tag: [t.number, t.definition(t.tagName), t.className, t.definition(t.variableName)], color: '#fbac52' },
-    { tag: [t.atom, t.bool, t.special(t.variableName)], color: '#E35F63' },
+    { tag: [t.atom, t.bool, t.special(t.variableName)], color: '#BA6666' },
     { tag: t.variableName, color: '#539ac4' },
     { tag: [t.propertyName, t.typeName], color: '#629ccd' },
     { tag: t.propertyName, color: '#36b7b5' },

+ 7 - 6
packages/editor/src/services/editor-theme/original-light.ts

@@ -12,24 +12,25 @@ export const originalLight: Extension = createTheme({
     foreground: '#24292e',
     selection: '#BBDFFF',
     selectionMatch: '#BBDFFF',
-    gutterBackground: '#fff',
-    gutterForeground: '#6e7781',
+    gutterBackground: '#FAF9F8',
+    gutterForeground: '#BCBBBA',
   },
   styles: [
-    { tag: [t.standard(t.tagName), t.tagName], color: '#116329' },
+    { tag: [t.standard(t.tagName), t.tagName], color: '#377148' },
     { tag: [t.comment, t.bracket], color: '#6a737d' },
     { tag: [t.className, t.propertyName], color: '#6f42c1' },
-    { tag: [t.variableName, t.attributeName, t.number, t.operator], color: '#005cc5' },
     { tag: [t.keyword, t.typeName, t.typeOperator, t.typeName], color: '#d73a49' },
-    { tag: [t.string, t.meta, t.regexp], color: '#032f62' },
     { tag: [t.name, t.quote], color: '#22863a' },
-    { tag: [t.heading, t.strong], color: '#24292e', fontWeight: 'bold' },
+    { tag: [t.heading], color: '#24292e', fontWeight: 'bold' },
     { tag: [t.emphasis], color: '#24292e', fontStyle: 'italic' },
     { tag: [t.deleted], color: '#b31d28', backgroundColor: 'ffeef0' },
+    { tag: [t.string, t.meta, t.regexp], color: '#032F62' },
     { tag: [t.atom, t.bool, t.special(t.variableName)], color: '#e36209' },
     { tag: [t.url, t.escape, t.regexp, t.link], color: '#032f62' },
     { tag: t.link, textDecoration: 'underline' },
     { tag: t.strikethrough, textDecoration: 'line-through' },
+    { tag: [t.variableName, t.attributeName, t.number, t.operator, t.character, t.brace, t.processingInstruction, t.inserted], color: '#516883' },
+    { tag: [t.strong], color: '#744763' },
     { tag: t.invalid, color: '#cb2431' },
   ],
 });