CodeBlock.utils.ts114 lines · main
| 1 | export const monokaiCustomTheme = (isDarkMode: boolean) => { |
| 2 | return { |
| 3 | hljs: { |
| 4 | display: 'block', |
| 5 | overflowX: 'auto', |
| 6 | color: isDarkMode ? '#ddd' : '#444', |
| 7 | }, |
| 8 | 'hljs-tag': { |
| 9 | color: '#569cd6', |
| 10 | }, |
| 11 | 'hljs-keyword': { |
| 12 | color: '#569cd6', |
| 13 | fontWeight: 'normal', |
| 14 | }, |
| 15 | 'hljs-selector-tag': { |
| 16 | color: '#569cd6', |
| 17 | fontWeight: 'normal', |
| 18 | }, |
| 19 | 'hljs-literal': { |
| 20 | color: '#569cd6', |
| 21 | fontWeight: 'normal', |
| 22 | }, |
| 23 | 'hljs-strong': { |
| 24 | color: '#569cd6', |
| 25 | }, |
| 26 | 'hljs-name': { |
| 27 | color: '#569cd6', |
| 28 | }, |
| 29 | 'hljs-code': { |
| 30 | color: '#66d9ef', |
| 31 | }, |
| 32 | 'hljs-class .hljs-title': { |
| 33 | color: 'gray', |
| 34 | }, |
| 35 | 'hljs-attribute': { |
| 36 | color: '#bf79db', |
| 37 | }, |
| 38 | 'hljs-symbol': { |
| 39 | color: '#bf79db', |
| 40 | }, |
| 41 | 'hljs-regexp': { |
| 42 | color: '#bf79db', |
| 43 | }, |
| 44 | 'hljs-link': { |
| 45 | color: '#bf79db', |
| 46 | }, |
| 47 | 'hljs-string': { |
| 48 | color: `hsl(var(--brand-link))`, |
| 49 | }, |
| 50 | 'hljs-bullet': { |
| 51 | color: '#3ECF8E', |
| 52 | }, |
| 53 | 'hljs-subst': { |
| 54 | color: '#3ECF8E', |
| 55 | }, |
| 56 | 'hljs-title': { |
| 57 | color: '#3ECF8E', |
| 58 | fontWeight: 'normal', |
| 59 | }, |
| 60 | 'hljs-section': { |
| 61 | color: '#3ECF8E', |
| 62 | fontWeight: 'normal', |
| 63 | }, |
| 64 | 'hljs-emphasis': { |
| 65 | color: '#3ECF8E', |
| 66 | }, |
| 67 | 'hljs-type': { |
| 68 | color: '#3ECF8E', |
| 69 | fontWeight: 'normal', |
| 70 | }, |
| 71 | 'hljs-built_in': { |
| 72 | color: '#3ECF8E', |
| 73 | }, |
| 74 | 'hljs-builtin-name': { |
| 75 | color: '#3ECF8E', |
| 76 | }, |
| 77 | 'hljs-selector-attr': { |
| 78 | color: '#3ECF8E', |
| 79 | }, |
| 80 | 'hljs-selector-pseudo': { |
| 81 | color: '#3ECF8E', |
| 82 | }, |
| 83 | 'hljs-addition': { |
| 84 | color: '#3ECF8E', |
| 85 | }, |
| 86 | 'hljs-variable': { |
| 87 | color: '#3ECF8E', |
| 88 | }, |
| 89 | 'hljs-template-tag': { |
| 90 | color: '#3ECF8E', |
| 91 | }, |
| 92 | 'hljs-template-variable': { |
| 93 | color: '#3ECF8E', |
| 94 | }, |
| 95 | 'hljs-comment': { |
| 96 | color: isDarkMode ? '#999' : '#888', |
| 97 | }, |
| 98 | 'hljs-quote': { |
| 99 | color: '#75715e', |
| 100 | }, |
| 101 | 'hljs-deletion': { |
| 102 | color: '#75715e', |
| 103 | }, |
| 104 | 'hljs-meta': { |
| 105 | color: '#75715e', |
| 106 | }, |
| 107 | 'hljs-doctag': { |
| 108 | fontWeight: 'normal', |
| 109 | }, |
| 110 | 'hljs-selector-id': { |
| 111 | fontWeight: 'normal', |
| 112 | }, |
| 113 | } |
| 114 | } |