Let the hunk-handle take up space

This commit is contained in:
tidy-dev 2024-02-14 07:21:14 -05:00
parent 9dd976884f
commit 8d1d413211
2 changed files with 0 additions and 15 deletions

View file

@ -517,12 +517,6 @@ export class SideBySideDiffRow extends React.Component<
return null
}
// In unified mode, the hunk handle left position depends on the line gutter
// width.
const style: React.CSSProperties = this.props.showSideBySideDiff
? {}
: { left: this.lineGutterWidth }
return (
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
<div
@ -531,7 +525,6 @@ export class SideBySideDiffRow extends React.Component<
onMouseLeave={this.onMouseLeaveHunk}
onClick={this.onClickHunk}
onContextMenu={this.onContextMenuHunk}
style={style}
></div>
)
}

View file

@ -150,11 +150,8 @@
}
.hunk-handle {
position: absolute;
height: 100%;
width: 20px;
left: calc(50% - 10px);
top: 0;
&.hoverable {
cursor: pointer;
@ -317,11 +314,6 @@
flex-direction: row;
}
.hunk-handle {
// `left` depends on the line number length at runtime
transform: translateX(calc(-50% + var(--line-gutter-right-border-width) / 2));
}
&.hunk-info {
.line-number {
background: var(--diff-hunk-gutter-background-color);