Skip to content

Commit 715ac8d

Browse files
committed
fix(ui): mobile nav vertical position and horizontal alignment
Root cause: float:right on the close button is ignored in flex containers, so it consumed ~3.25rem of vertical space as a flex row instead of floating out of flow. This pushed nav items down by roughly two section-heights. Fix: - Close button: position absolute in top-right corner (restoring the original float:right intent without consuming flow space) - First nav item: remove top border (no orphan line at list top) - Nav links: padding-inline 0 so text aligns with divider lines (panel padding already provides the overall inset)
1 parent d907398 commit 715ac8d

1 file changed

Lines changed: 7 additions & 13 deletions

File tree

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

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

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ flex-header {
101101
text-align: center;
102102
cursor: pointer;
103103
flex: none;
104+
float: right;
105+
margin: -0.75rem -1rem 1rem auto;
104106

105107
&:focus {
106108
outline: 0.25rem solid var(--flex-color-focus);
@@ -364,8 +366,9 @@ flex-header {
364366

365367
.flex-header__close-btn {
366368
display: block;
367-
align-self: flex-end;
368-
margin: -0.5rem -0.5rem 0;
369+
position: absolute;
370+
inset-block-start: 0.5rem;
371+
inset-inline-end: 0.5rem;
369372
}
370373

371374
.flex-header__nav-list {
@@ -423,28 +426,19 @@ flex-header {
423426
}
424427

425428
.flex-header__user-identity {
426-
padding: 0;
429+
padding-inline: 0;
427430
}
428431

429432
.flex-header__user-theme {
430-
padding: 0;
433+
padding-inline: 0;
431434
}
432435

433436
.flex-header__user-settings {
434-
padding: 0;
435-
}
436-
437-
.flex-header__user-settings-link {
438437
padding-inline: 0;
439438
}
440439

441440
.flex-header__user-signout {
442-
padding: 0;
443-
}
444-
445-
.flex-header__user-signout-btn {
446441
padding-inline: 0;
447-
text-align: start;
448442
}
449443

450444
/* Signed-out parallel: theme toggle as a utility section at the bottom of the panel */

0 commit comments

Comments
 (0)