Skip to content

Commit 18fa325

Browse files
committed
fix(emcn): keep resource tab widths consistent
1 parent f822a52 commit 18fa325

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

packages/emcn/src/components/tab-strip/tab-strip.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,14 @@ function Tab({
148148
<div
149149
className={cn(
150150
'group relative select-none',
151+
// Width, not flex-basis: `flex-1` compiles to `flex: 1 1 0%`, and
152+
// Tailwind emits the `flex` shorthand after `flex-basis`, so pairing
153+
// the two silently discarded the basis and left every tab sized by its
154+
// own title. `shrink` still lets a crowded strip squeeze them to the
155+
// floor before it starts scrolling.
151156
tab.pinned
152157
? 'w-[34px] min-w-[34px] max-w-[34px] flex-none'
153-
: 'min-w-[96px] max-w-[180px] flex-1 basis-[140px]',
158+
: 'w-[156px] min-w-[96px] shrink',
154159
dragging && 'opacity-30'
155160
)}
156161
draggable={draggable}

0 commit comments

Comments
 (0)