File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -293,11 +293,11 @@ export class DevtoolsCompare extends Element {
293293 < div class ="error-banner-message "> ${ errorMessage } </ div >
294294 </ div > `
295295 : nothing }
296+ < div class ="cmp-colhead ">
297+ < div class ="col-header "> ${ this . swapped ? 'Latest' : 'Baseline' } </ div >
298+ < div class ="col-header "> ${ this . swapped ? 'Baseline' : 'Latest' } </ div >
299+ </ div >
296300 < div class ="cmp-body ">
297- < div class ="cmp-colhead ">
298- < div class ="col-header "> ${ this . swapped ? 'Latest' : 'Baseline' } </ div >
299- < div class ="col-header "> ${ this . swapped ? 'Baseline' : 'Latest' } </ div >
300- </ div >
301301 < div class ="cmp-rows ">
302302 ${ visiblePairs . map ( ( pair ) =>
303303 this . #renderPair( pair , leftCommands , rightCommands , firstDivergent )
Original file line number Diff line number Diff line change @@ -129,24 +129,22 @@ export const compareStyles = css`
129129 }
130130
131131 /* ── Diff body ── */
132- . cmp-body {
133- flex : 1 1 auto;
134- min-height : 0 ;
135- overflow : auto;
136- padding : 12px 14px ;
137- }
132+ /* Header sits OUTSIDE the scroll container so rows can't scroll above it. */
138133 . cmp-colhead {
134+ flex : none;
139135 display : grid;
140136 grid-template-columns : 1fr 1fr ;
141137 gap : 12px ;
142- position : sticky;
143- top : 0 ;
144- z-index : 2 ;
145- margin-bottom : 6px ;
146- padding : 2px 0 8px ;
138+ padding : 10px 14px 8px ;
147139 background : var ( --vscode-editor-background ) ;
148140 border-bottom : 1px solid var ( --vscode-panel-border ) ;
149141 }
142+ . cmp-body {
143+ flex : 1 1 auto;
144+ min-height : 0 ;
145+ overflow : auto;
146+ padding : 12px 14px ;
147+ }
150148 . col-header {
151149 font-size : 11px ;
152150 font-weight : 700 ;
Original file line number Diff line number Diff line change @@ -46,19 +46,20 @@ button[data-draggable-id]::after {
4646 height 0.12s ;
4747 pointer-events : none;
4848}
49+ /* The handle is positioned at `position - 3px` (see DragController), so the
50+ real pane boundary is 3px in. Place the line there — centering it (50%)
51+ leaves it ~2px off the boundary, creating a gap where it meets a border. */
4952button [data-draggable-id ]. cursor-col-resize :: after {
5053 top : 0 ;
5154 bottom : 0 ;
52- left : 50 % ;
55+ left : 3 px ;
5356 width : 1px ;
54- transform : translateX ( -50% ) ;
5557}
5658button [data-draggable-id ]. cursor-row-resize :: after {
5759 left : 0 ;
5860 right : 0 ;
59- top : 50 % ;
61+ top : 3 px ;
6062 height : 1px ;
61- transform : translateY ( -50% ) ;
6263}
6364button [data-draggable-id ]: hover :: after ,
6465button [data-draggable-id ][data-dragging = 'dragging' ]:: after {
You can’t perform that action at this time.
0 commit comments