Files
MealQuest/web/src/shell/BottomBar.module.css
T
dev_agentandClaude Opus 5.5 004a81b854
CI / ci (pull_request) Successful in 1m32s
CI / ci (push) Successful in 1m31s
Slide one shared grape pill between mobile nav items
The mobile bottom bar now draws a single absolutely positioned grape pill
(top 10 px, height 42 px) behind its items and implements handoff Motion
section 1: on a tab change it slides the pill from the old item's left and
width to the new one's over 420 ms on the --ease-spring curve, FLIPs every
moved item with the same timing, and fades the new label in (220 ms
ease-out after 120 ms). Icon colour crossfades via transition color .2s.
Under prefers-reduced-motion the pill jumps with no animation. The pill is
re-placed on resize and once document.fonts.ready resolves. Each item
keeps the full 62 px bar height as its tap target.

Maestro task d340ae00-3c2a-48cf-9ac6-35e0b8ed5a7c

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:44:44 -04:00

66 lines
1.4 KiB
CSS

.bar {
position: absolute;
left: 12px;
right: 12px;
bottom: calc(16px + env(safe-area-inset-bottom));
height: 62px;
padding: 0 6px;
box-sizing: border-box;
display: flex;
justify-content: space-around;
align-items: center;
border-radius: var(--radius-pill);
background: var(--color-text);
}
/* The one grape pill, shared by every item: BottomBar sets its left and width
to the active item's and slides it between items. */
.pill {
position: absolute;
top: 10px;
height: 42px;
z-index: 0;
border-radius: var(--radius-pill);
background: var(--color-accent);
pointer-events: none;
}
/* The whole bar height is the tap target; the 42 px pill sits behind it.
Items stay above the pill. */
.item {
position: relative;
z-index: 1;
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
height: 62px;
min-width: 44px;
padding: 0 13px;
box-sizing: border-box;
color: var(--color-neutral-400);
text-decoration: none;
white-space: nowrap;
transition: color .2s;
}
.item[aria-current='page'] {
color: var(--on-accent);
}
.label {
font-family: var(--font-body);
font-size: 13px;
font-weight: 700;
}
/* Inactive items are icon-only on screen but keep their name for assistive tech. */
.hiddenLabel {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}