Skip to content

Commit f224807

Browse files
committed
fix: fix git diff overlapping close #197
1 parent fa33afb commit f224807

3 files changed

Lines changed: 23 additions & 0 deletions

File tree

src/features/git/components/GitDiffViewer.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ const DIFF_SCROLL_CSS = `
4040
background-image: none !important;
4141
}
4242
43+
diffs-container,
44+
[data-diffs],
45+
[data-diffs-header],
46+
[data-error-wrapper] {
47+
position: relative !important;
48+
contain: layout style !important;
49+
isolation: isolate !important;
50+
}
51+
4352
[data-diffs-header],
4453
[data-diffs],
4554
[data-error-wrapper] {

src/styles/diff-viewer.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@
276276
width: 100%;
277277
padding-bottom: 0;
278278
will-change: transform;
279+
isolation: isolate;
279280
}
280281

281282
.diff-viewer-item {
@@ -286,6 +287,7 @@
286287
width: 100%;
287288
border-bottom: 1px solid var(--border-subtle);
288289
position: relative;
290+
isolation: isolate;
289291
}
290292

291293
.diff-viewer-item.active {
@@ -378,6 +380,9 @@
378380
min-width: 0;
379381
width: 100%;
380382
overflow: visible;
383+
position: relative;
384+
contain: layout style;
385+
isolation: isolate;
381386
--diffs-font-family: var(--code-font-family);
382387
--diffs-font-size: var(--code-font-size, 11px);
383388
--diffs-line-height: 1.4;
@@ -389,6 +394,9 @@
389394
border-radius: 0;
390395
padding: 0;
391396
box-shadow: none;
397+
position: relative;
398+
contain: layout style;
399+
isolation: isolate;
392400
}
393401

394402
.diff-viewer-output diffs-container {

src/styles/main.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,18 +715,24 @@
715715
display: flex;
716716
min-height: 0;
717717
min-width: 0;
718+
isolation: isolate;
718719
}
719720

720721
.content-layer.is-hidden {
721722
opacity: 0;
722723
pointer-events: none;
723724
visibility: hidden;
725+
position: absolute;
726+
z-index: -1;
727+
contain: layout style paint;
724728
}
725729

726730
.content-layer.is-active {
727731
opacity: 1;
728732
pointer-events: auto;
729733
visibility: visible;
734+
z-index: 0;
735+
contain: layout style paint;
730736
}
731737

732738
.app.reduced-transparency .content {

0 commit comments

Comments
 (0)