diff options
author | 2021-11-04 20:17:45 +0100 | |
---|---|---|
committer | 2021-11-05 18:32:15 +0100 | |
commit | 6a03842b14b9e4ea1a29a7745acfab15875ffeeb (patch) | |
tree | a0c153143ae6db7ef1a4aa898eb8dc4e9326475c /language-web/src/main/js | |
parent | fix(language): hide current implicit proposal (diff) | |
download | refinery-6a03842b14b9e4ea1a29a7745acfab15875ffeeb.tar.gz refinery-6a03842b14b9e4ea1a29a7745acfab15875ffeeb.tar.zst refinery-6a03842b14b9e4ea1a29a7745acfab15875ffeeb.zip |
fix(web): fix fold gutter styling
We can't seem to be able to style the fold gutter in the current line to
set its background color, so we set the background of the whole gutter
instead.
Diffstat (limited to 'language-web/src/main/js')
-rw-r--r-- | language-web/src/main/js/editor/EditorParent.ts | 9 | ||||
-rw-r--r-- | language-web/src/main/js/editor/EditorStore.ts | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/language-web/src/main/js/editor/EditorParent.ts b/language-web/src/main/js/editor/EditorParent.ts index ee1323f6..2d74b863 100644 --- a/language-web/src/main/js/editor/EditorParent.ts +++ b/language-web/src/main/js/editor/EditorParent.ts | |||
@@ -34,6 +34,9 @@ export const EditorParent = styled('div')(({ theme }) => { | |||
34 | '&, .cm-editor': { | 34 | '&, .cm-editor': { |
35 | height: '100%', | 35 | height: '100%', |
36 | }, | 36 | }, |
37 | '.cm-content': { | ||
38 | padding: 0, | ||
39 | }, | ||
37 | '.cm-scroller, .cm-tooltip-autocomplete, .cm-completionLabel, .cm-completionDetail': { | 40 | '.cm-scroller, .cm-tooltip-autocomplete, .cm-completionLabel, .cm-completionDetail': { |
38 | fontSize: 16, | 41 | fontSize: 16, |
39 | fontFamily: '"JetBrains MonoVariable", "JetBrains Mono", monospace', | 42 | fontFamily: '"JetBrains MonoVariable", "JetBrains Mono", monospace', |
@@ -46,7 +49,7 @@ export const EditorParent = styled('div')(({ theme }) => { | |||
46 | color: theme.palette.text.secondary, | 49 | color: theme.palette.text.secondary, |
47 | }, | 50 | }, |
48 | '.cm-gutters': { | 51 | '.cm-gutters': { |
49 | background: theme.palette.background.default, | 52 | background: 'rgba(255, 255, 255, 0.1)', |
50 | color: theme.palette.text.disabled, | 53 | color: theme.palette.text.disabled, |
51 | border: 'none', | 54 | border: 'none', |
52 | }, | 55 | }, |
@@ -57,7 +60,9 @@ export const EditorParent = styled('div')(({ theme }) => { | |||
57 | background: 'rgba(0, 0, 0, 0.3)', | 60 | background: 'rgba(0, 0, 0, 0.3)', |
58 | }, | 61 | }, |
59 | '.cm-activeLineGutter': { | 62 | '.cm-activeLineGutter': { |
60 | background: 'rgba(0, 0, 0, 0.3)', | 63 | background: 'transparent', |
64 | }, | ||
65 | '.cm-lineNumbers .cm-activeLineGutter': { | ||
61 | color: theme.palette.text.primary, | 66 | color: theme.palette.text.primary, |
62 | }, | 67 | }, |
63 | '.cm-cursor, .cm-cursor-primary': { | 68 | '.cm-cursor, .cm-cursor-primary': { |
diff --git a/language-web/src/main/js/editor/EditorStore.ts b/language-web/src/main/js/editor/EditorStore.ts index ba31efcb..059233f4 100644 --- a/language-web/src/main/js/editor/EditorStore.ts +++ b/language-web/src/main/js/editor/EditorStore.ts | |||
@@ -112,8 +112,8 @@ export class EditorStore { | |||
112 | }), | 112 | }), |
113 | semanticHighlighting, | 113 | semanticHighlighting, |
114 | // We add the gutters to `extensions` in the order we want them to appear. | 114 | // We add the gutters to `extensions` in the order we want them to appear. |
115 | foldGutter(), | ||
116 | lineNumbers(), | 115 | lineNumbers(), |
116 | foldGutter(), | ||
117 | keymap.of([ | 117 | keymap.of([ |
118 | ...closeBracketsKeymap, | 118 | ...closeBracketsKeymap, |
119 | ...commentKeymap, | 119 | ...commentKeymap, |