Skip to content

Commit 3605de4

Browse files
committed
fix(ui): position close button absolutely so nav items start at top
The close button used float:right which is ignored in flex containers, causing it to consume a full row (~4rem) of vertical space and push nav items down. Position it absolutely in the top-right corner instead. Also remove the first nav item's top border and the redundant link inline padding so items align flush with the panel's divider lines.
1 parent ee8ffeb commit 3605de4

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

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

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

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

107105
&:focus {
108106
outline: 0.25rem solid var(--flex-color-focus);
@@ -366,6 +364,9 @@ flex-header {
366364

367365
.flex-header__close-btn {
368366
display: block;
367+
position: absolute;
368+
inset-block-start: 0.25rem;
369+
inset-inline-end: 0.25rem;
369370
}
370371

371372
.flex-header__nav-list {
@@ -378,6 +379,10 @@ flex-header {
378379
border-block-start: 1px solid var(--flex-color-border);
379380
}
380381

382+
.flex-header__nav-item:first-child {
383+
border-block-start: 0;
384+
}
385+
381386
.flex-header__nav-link {
382387
padding-block: 0.75rem;
383388
padding-inline: 0;

0 commit comments

Comments
 (0)