Skip to content

Commit c18e5ea

Browse files
authored
fix(web): stop clipping the bottoms of diff file names (#14375)
1 parent 0fcd5f9 commit c18e5ea

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

‎apps/web/src/components/diffs/StyledDiffCodeView.tsx‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,13 @@ const DIFF_VIEW_UNSAFE_CSS = `${DIFF_SURFACE_THEME_UNSAFE_CSS}
200200
line-height: 1 !important;
201201
}
202202
203+
/* Pierre clips file names with overflow: hidden for its start ellipsis. A 1em line box cuts off
204+
descenders. Only the clipped names get room: 16px plus the header's 12px of padding stays
205+
inside its 32px min-height, which diffHeaderHeight assumes. */
206+
[data-diffs-header] :is([data-title], [data-prev-name]) {
207+
line-height: 16px !important;
208+
}
209+
203210
[data-diffs-header] [data-metadata] {
204211
align-items: center !important;
205212
line-height: 1 !important;
@@ -222,18 +229,12 @@ const DIFF_VIEW_UNSAFE_CSS = `${DIFF_SURFACE_THEME_UNSAFE_CSS}
222229
223230
[data-title] {
224231
cursor: pointer;
225-
transition:
226-
color 120ms ease,
227-
text-decoration-color 120ms ease;
228-
text-decoration: underline;
229-
text-decoration-color: transparent;
230-
text-underline-offset: 2px;
232+
transition: color 120ms ease;
231233
font-family: var(--font-sans) !important;
232234
}
233235
234236
[data-title]:hover {
235237
color: color-mix(in srgb, var(--code-foreground) 84%, var(--primary)) !important;
236-
text-decoration-color: currentColor;
237238
}
238239
239240
/* Expanding a file mounts its body all at once; easing it in matches the 200ms the app's

0 commit comments

Comments
 (0)