Commit 76b787b
committed
fix(#92): command palette — independent width on narrow viewports
When the viewport shrinks below md, the HeaderSearch row collapses
to a 34px magnifying-glass compact button. The palette positioner
was clamping its width to the search wrap, so on narrow viewports
the slide-down panel became an unusable ~34px vertical strip with
one-letter labels.
Decouple palette width from the search wrap:
width = clamp(360px, searchWrap.width, min(640px, viewport - 16))
Then re-anchor centered on the search input and clamp the resulting
left position so the panel stays inside the viewport with an 8px
gutter on each side.
At vw=875 the panel is 360px wide (MIN_W) and left-aligned near
the viewport edge; at vw=1500 it's its natural ~445px under the
search box; at vw≥1880 it caps at 640px MAX_W. The list rows now
read cleanly across the full responsive range.
Refs #921 parent 7e4121e commit 76b787b
1 file changed
Lines changed: 21 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
398 | 413 | | |
399 | | - | |
| 414 | + | |
400 | 415 | | |
401 | 416 | | |
402 | 417 | | |
| |||
0 commit comments