aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/editor
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-08-12 21:57:01 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-08-12 22:05:43 +0200
commit66216786a70e415775cf7e4b84cfd7d74b07aad0 (patch)
treea47dc186fb309627c069edacf9754b9ec483d0a4 /subprojects/frontend/src/editor
parentrefactor(frontend): EditorParent line numbers (diff)
downloadrefinery-66216786a70e415775cf7e4b84cfd7d74b07aad0.tar.gz
refinery-66216786a70e415775cf7e4b84cfd7d74b07aad0.tar.zst
refinery-66216786a70e415775cf7e4b84cfd7d74b07aad0.zip
feat(frontend): light/dark mode switch
Diffstat (limited to 'subprojects/frontend/src/editor')
-rw-r--r--subprojects/frontend/src/editor/EditorParent.ts25
1 files changed, 13 insertions, 12 deletions
diff --git a/subprojects/frontend/src/editor/EditorParent.ts b/subprojects/frontend/src/editor/EditorParent.ts
index a4cdfa38..805065fc 100644
--- a/subprojects/frontend/src/editor/EditorParent.ts
+++ b/subprojects/frontend/src/editor/EditorParent.ts
@@ -90,12 +90,12 @@ export default styled('div', {
90 borderLeft: `2px solid ${theme.palette.primary.main}`, 90 borderLeft: `2px solid ${theme.palette.primary.main}`,
91 }, 91 },
92 '.cm-selectionBackground': { 92 '.cm-selectionBackground': {
93 background: '#3e4453', 93 background: theme.palette.selection.main,
94 }, 94 },
95 '.cm-focused': { 95 '.cm-focused': {
96 outline: 'none', 96 outline: 'none',
97 '.cm-selectionBackground': { 97 '.cm-selectionBackground': {
98 background: '#3e4453', 98 background: theme.palette.selection.main,
99 }, 99 },
100 }, 100 },
101 '.cm-panels-top': { 101 '.cm-panels-top': {
@@ -123,10 +123,11 @@ export default styled('div', {
123 li: { 123 li: {
124 borderBottom: `1px solid ${theme.palette.divider}`, 124 borderBottom: `1px solid ${theme.palette.divider}`,
125 cursor: 'pointer', 125 cursor: 'pointer',
126 color: theme.palette.text.primary,
126 }, 127 },
127 '[aria-selected]': { 128 '[aria-selected]': {
128 background: '#3e4453', 129 background: theme.palette.selection.main,
129 color: theme.palette.text.primary, 130 color: theme.palette.selection.contrastText,
130 }, 131 },
131 '&:focus [aria-selected]': { 132 '&:focus [aria-selected]': {
132 background: theme.palette.primary.main, 133 background: theme.palette.primary.main,
@@ -161,7 +162,7 @@ export default styled('div', {
161 color: theme.palette.text.disabled, 162 color: theme.palette.text.disabled,
162 }, 163 },
163 '.tok-number': { 164 '.tok-number': {
164 color: '#6188a6', 165 color: theme.palette.highlight.number,
165 }, 166 },
166 '.tok-string': { 167 '.tok-string': {
167 color: theme.palette.secondary.dark, 168 color: theme.palette.secondary.dark,
@@ -173,7 +174,7 @@ export default styled('div', {
173 color: theme.palette.text.primary, 174 color: theme.palette.text.primary,
174 }, 175 },
175 '.tok-variableName': { 176 '.tok-variableName': {
176 color: '#c8ae9d', 177 color: theme.palette.highlight.parameter,
177 }, 178 },
178 '.tok-problem-node': { 179 '.tok-problem-node': {
179 '&, & .tok-variableName': { 180 '&, & .tok-variableName': {
@@ -224,9 +225,9 @@ export default styled('div', {
224 fontStyle: 'normal', 225 fontStyle: 'normal',
225 }, 226 },
226 '[aria-selected]': { 227 '[aria-selected]': {
227 background: `${theme.palette.primary.main} !important`, 228 background: `${theme.palette.selection.main} !important`,
228 '.cm-completionIcon, .cm-completionLabel, .cm-completionDetail': { 229 '.cm-completionIcon, .cm-completionLabel, .cm-completionDetail': {
229 color: theme.palette.primary.contrastText, 230 color: theme.palette.selection.contrastText,
230 }, 231 },
231 }, 232 },
232 }, 233 },
@@ -237,11 +238,11 @@ export default styled('div', {
237 textAlign: 'center', 238 textAlign: 'center',
238 }, 239 },
239 ...codeMirrorLintStyle, 240 ...codeMirrorLintStyle,
240 '.cm-problem-write': {
241 background: 'rgba(255, 255, 128, 0.3)',
242 },
243 '.cm-problem-read': { 241 '.cm-problem-read': {
244 background: 'rgba(255, 255, 255, 0.15)', 242 background: theme.palette.highlight.occurences.read,
243 },
244 '.cm-problem-write': {
245 background: theme.palette.highlight.occurences.write,
245 }, 246 },
246 }; 247 };
247}); 248});