Skip to content

Commit fd041fd

Browse files
authored
fix(ui): stop InputNumber stepper buttons overflowing width-capped fields
Inner input defaulted to min-width:auto (~192px intrinsic), so flexbox couldn't shrink it inside the 128px (w-32) root — pushing the stacked stepper buttons past the field onto the Convert button. min-width:0 lets it shrink. Verified via headless render.
1 parent a6c3586 commit fd041fd

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/app/globals.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,17 @@
118118
padding: 0.25rem 0.5rem;
119119
font-size: 0.8125rem;
120120
}
121+
122+
/* InputNumber with stepper buttons (PrNumberInput/PrAmountInput). The root is
123+
forced to `display:flex` and can be width-capped (e.g. w-32). PrimeReact's
124+
injected structure lays out [input][button-group] as flex siblings but never
125+
tells the input to shrink — so at its ~175px intrinsic width it overflows a
126+
narrow container and pushes the stepper buttons out over the next element.
127+
Let the input flex to fill and shrink to 0 so the buttons stay inside. */
128+
.p-inputnumber .p-inputnumber-input {
129+
flex: 1 1 0;
130+
min-width: 0;
131+
}
121132
}
122133

123134
/* @uiw/react-md-editor's split/read preview pane has its own renderer and

0 commit comments

Comments
 (0)