Skip to content

Commit a4047d1

Browse files
authored
fix: improve diff viewer dark mode visibility and space utilization (#706)
1 parent 24968fb commit a4047d1

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

apps/twig/src/renderer/features/code-editor/theme/editorTheme.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,13 @@ export const oneLight: Extension = [
202202

203203
export const mergeViewTheme = EditorView.baseTheme({
204204
".cm-mergeView": {
205+
height: "100%",
205206
overflowY: "auto",
206207
},
207208
".cm-mergeViewEditors": {
208209
display: "flex",
209210
alignItems: "stretch",
211+
minHeight: "100%",
210212
},
211213
".cm-mergeViewEditor": {
212214
flexGrow: "1",
@@ -230,16 +232,20 @@ export const mergeViewTheme = EditorView.baseTheme({
230232
font: "inherit",
231233
cursor: "pointer",
232234
},
233-
".cm-mergeView & .cm-scroller, .cm-mergeView &": {
234-
height: "auto !important",
235-
overflowY: "visible !important",
236-
},
237-
"&.cm-merge-a .cm-changedLine, .cm-deletedChunk": {
235+
// Light mode - subtle backgrounds
236+
"&light.cm-merge-a .cm-changedLine, &light .cm-deletedChunk": {
238237
backgroundColor: "rgba(220, 80, 80, .15)",
239238
},
240-
"&.cm-merge-b .cm-changedLine, .cm-inlineChangedLine": {
239+
"&light.cm-merge-b .cm-changedLine, &light .cm-inlineChangedLine": {
241240
backgroundColor: "rgba(80, 180, 100, .15)",
242241
},
242+
// Dark mode - more visible backgrounds
243+
"&dark.cm-merge-a .cm-changedLine, &dark .cm-deletedChunk": {
244+
backgroundColor: "rgba(255, 100, 100, .25)",
245+
},
246+
"&dark.cm-merge-b .cm-changedLine, &dark .cm-inlineChangedLine": {
247+
backgroundColor: "rgba(100, 220, 120, .25)",
248+
},
243249
"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":
244250
{
245251
background:

0 commit comments

Comments
 (0)