aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/editor/EditorTheme.ts
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-12-01 02:41:30 +0100
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-12-09 00:07:39 +0100
commitfa5aa53940f4985ab10aa31ac0cefe9d52a54a87 (patch)
treecb206fe9e980e3fa6752c5882a15a701b3aec7af /subprojects/frontend/src/editor/EditorTheme.ts
parentfeat(frontend): dev mode badge (diff)
downloadrefinery-fa5aa53940f4985ab10aa31ac0cefe9d52a54a87.tar.gz
refinery-fa5aa53940f4985ab10aa31ac0cefe9d52a54a87.tar.zst
refinery-fa5aa53940f4985ab10aa31ac0cefe9d52a54a87.zip
refactor(frontend): scrollbar improvements
Diffstat (limited to 'subprojects/frontend/src/editor/EditorTheme.ts')
-rw-r--r--subprojects/frontend/src/editor/EditorTheme.ts22
1 files changed, 16 insertions, 6 deletions
diff --git a/subprojects/frontend/src/editor/EditorTheme.ts b/subprojects/frontend/src/editor/EditorTheme.ts
index 89bc8932..e9907e83 100644
--- a/subprojects/frontend/src/editor/EditorTheme.ts
+++ b/subprojects/frontend/src/editor/EditorTheme.ts
@@ -84,6 +84,11 @@ export default styled('div', {
84 background: 'transparent', 84 background: 'transparent',
85 }, 85 },
86 }, 86 },
87 '.cm-scroller-track': {
88 position: 'absolute',
89 zIndex: 300,
90 touchAction: 'none',
91 },
87 '.cm-scroller-thumb': { 92 '.cm-scroller-thumb': {
88 position: 'absolute', 93 position: 'absolute',
89 background: theme.palette.text.secondary, 94 background: theme.palette.text.secondary,
@@ -105,13 +110,18 @@ export default styled('div', {
105 userSelect: 'none', 110 userSelect: 'none',
106 }, 111 },
107 }, 112 },
108 '.cm-scroller-thumb-y': { 113 '.cm-scroller-track-y, .cm-scroller-thumb-y': {
109 top: 0, 114 top: 0,
110 right: 0, 115 right: 0,
116 width: 12,
111 }, 117 },
112 '.cm-scroller-thumb-x': { 118 '.cm-scroller-track-x, .cm-scroller-thumb-x': {
113 left: 0, 119 left: 0,
114 bottom: 0, 120 bottom: 0,
121 height: 12,
122 },
123 '.cm-scroller-track-x': {
124 right: 12,
115 }, 125 },
116 '.cm-scroller-gutter-decoration': { 126 '.cm-scroller-gutter-decoration': {
117 position: 'absolute', 127 position: 'absolute',
@@ -141,7 +151,6 @@ export default styled('div', {
141 }, 151 },
142 '.cm-content': { 152 '.cm-content': {
143 ...editorFontStyle, 153 ...editorFontStyle,
144 padding: '0 12px 0 0',
145 }, 154 },
146 '.cm-activeLine': { 155 '.cm-activeLine': {
147 background: showActiveLine 156 background: showActiveLine
@@ -165,6 +174,7 @@ export default styled('div', {
165 }, 174 },
166 '.cm-line': { 175 '.cm-line': {
167 position: 'relative', // For indentation highlights 176 position: 'relative', // For indentation highlights
177 padding: '0 12px 0 0px',
168 }, 178 },
169 }; 179 };
170 180
@@ -440,11 +450,11 @@ export default styled('div', {
440 450
441 const foldStyle = { 451 const foldStyle = {
442 '.cm-foldGutter': { 452 '.cm-foldGutter': {
443 width: 16, 453 width: 18,
444 }, 454 },
445 '.problem-editor-foldMarker': { 455 '.problem-editor-foldMarker': {
446 display: 'block', 456 display: 'block',
447 margin: '4px 0', 457 margin: '4px 2px 4px 0',
448 padding: 0, 458 padding: 0,
449 maskImage: svgURL(expandMoreSVG), 459 maskImage: svgURL(expandMoreSVG),
450 maskSize: '16px 16px', 460 maskSize: '16px 16px',
@@ -455,7 +465,7 @@ export default styled('div', {
455 cursor: 'pointer', 465 cursor: 'pointer',
456 WebkitTapHighlightColor: 'transparent', 466 WebkitTapHighlightColor: 'transparent',
457 [theme.breakpoints.down('sm')]: { 467 [theme.breakpoints.down('sm')]: {
458 margin: '2px 0', 468 margin: '2px 2px 2px 0',
459 }, 469 },
460 }, 470 },
461 '.problem-editor-foldMarker-open': { 471 '.problem-editor-foldMarker-open': {