Skip to content

Commit b667e64

Browse files
Aclaude
andcommitted
fix(tabs): stop scrollable tabs from shrinking/clipping labels on resize
Tabs are flex children of `.tab-wrap`. In a `.tab-wrap.scrollable` bar the container has `overflow-x: scroll`, but the tabs still default to `flex: 0 1 auto`, so when the bar is too narrow (resize / browser zoom / reflow) the browser shrinks each tab below its content width — squashing and clipping the labels instead of scrolling. Set `flex: 0 0 auto` on `.tab` ONLY inside `.tab-wrap.scrollable`, so tabs keep their content width and the bar scrolls. Scoping to `.scrollable` leaves non-scrollable variants untouched — notably the stat `full-width` variant, which sets `--width: 100%` and relies on the default `flex-shrink: 1` to share the row and would otherwise overflow. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 5875504 commit b667e64

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/components/Tabs/tabs.module.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
&.scrollable {
55
overflow-x: scroll;
66
@include no-scrollbars;
7+
8+
// Keep each tab at its content width so labels aren't compressed/clipped
9+
// when the bar is too narrow (resize/zoom/reflow); the bar scrolls instead.
10+
// Scoped to .scrollable so non-scrollable variants (e.g. stat full-width,
11+
// which rely on flex-shrink to share the row) are unaffected.
12+
.tab {
13+
flex: 0 0 auto;
14+
}
715
}
816

917
&.underlined {

0 commit comments

Comments
 (0)