original-light.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Ref: https://github.com/uiwjs/react-codemirror/blob/bf3b862923d0cb04ccf4bb9da0791bdc7fd6d29b/themes/github/src/index.ts
  2. import { Extension } from '@codemirror/state';
  3. import { tags as t } from '@lezer/highlight';
  4. import { createTheme } from '@uiw/codemirror-themes';
  5. export const originalLight: Extension = createTheme({
  6. theme: 'light',
  7. settings: {
  8. background: '#fff',
  9. foreground: '#24292e',
  10. selection: '#BBDFFF',
  11. selectionMatch: '#BBDFFF',
  12. gutterBackground: '#FAF9F8',
  13. gutterForeground: '#BCBBBA',
  14. },
  15. styles: [
  16. { tag: [t.standard(t.tagName), t.tagName], color: '#377148' },
  17. { tag: [t.comment, t.bracket], color: '#6a737d' },
  18. { tag: [t.className, t.propertyName], color: '#6f42c1' },
  19. { tag: [t.keyword, t.typeName, t.typeOperator, t.typeName], color: '#d73a49' },
  20. { tag: [t.name, t.quote], color: '#22863a' },
  21. { tag: [t.heading], color: '#24292e', fontWeight: 'bold' },
  22. { tag: [t.emphasis], color: '#24292e', fontStyle: 'italic' },
  23. { tag: [t.deleted], color: '#b31d28', backgroundColor: 'ffeef0' },
  24. { tag: [t.string, t.meta, t.regexp], color: '#032F62' },
  25. { tag: [t.atom, t.bool, t.special(t.variableName)], color: '#e36209' },
  26. { tag: [t.url, t.escape, t.regexp, t.link], color: '#032f62' },
  27. { tag: t.link, textDecoration: 'underline' },
  28. { tag: t.strikethrough, textDecoration: 'line-through' },
  29. { tag: [t.variableName, t.attributeName, t.number, t.operator, t.character, t.brace, t.processingInstruction, t.inserted], color: '#516883' },
  30. { tag: [t.strong], color: '#744763' },
  31. { tag: t.invalid, color: '#cb2431' },
  32. ],
  33. });