Skip to content

Commit bdbb4ac

Browse files
committed
fix(ui): convert mobile nav from hardcoded rem to px/tokens
The design system switched spacing tokens to px units, but the header component still used hardcoded rem values. On iOS, rem can resolve differently than expected. Convert mobile nav styles to px and token variables for consistency with the rest of the design system: - padding: 1rem → var(--flex-space-md) - close button insets: 0.5rem → var(--flex-space-sm) - nav link padding: 0.75rem → 12px - panel width/animation: 15rem → 240px
1 parent 49abdca commit bdbb4ac

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

  • src/design-system/components/flex-header

src/design-system/components/flex-header/styles.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,8 @@ flex-header {
354354
flex-direction: column;
355355
justify-content: flex-start;
356356
overflow-y: auto;
357-
padding: 1rem;
358-
inline-size: 15rem;
357+
padding: var(--flex-space-md);
358+
inline-size: 240px;
359359
z-index: 500;
360360

361361
&.is-visible {
@@ -367,8 +367,8 @@ flex-header {
367367
.flex-header__close-btn {
368368
display: block;
369369
position: absolute;
370-
top: 0.5rem;
371-
right: 0.5rem;
370+
top: var(--flex-space-sm);
371+
right: var(--flex-space-sm);
372372
float: none;
373373
margin: 0;
374374
}
@@ -388,7 +388,7 @@ flex-header {
388388
}
389389

390390
.flex-header__nav-link {
391-
padding-block: 0.75rem;
391+
padding-block: 12px;
392392
padding-inline: 0;
393393
}
394394

@@ -457,7 +457,7 @@ flex-header {
457457

458458
@keyframes flex-header-slidein {
459459
0% {
460-
transform: translateX(15rem);
460+
transform: translateX(240px);
461461
}
462462

463463
100% {

0 commit comments

Comments
 (0)