Skip to content

Commit 3a260b5

Browse files
Edwin Chanclaude
authored andcommitted
fix(nav): keep nav-item icon position constant across collapse
Collapsed nav-item now uses the same padding-based layout as the expanded state, just clipped to the rail width. The icon sits at the same x in both states so the rail no longer feels like the items shift sideways during the transition. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent be412d0 commit 3a260b5

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

app/globals.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,13 @@ body.has-site-sidebar .site-content {
226226
}
227227

228228
.sidebar:not(:hover):not(:focus-within) .nav-item {
229-
width: 36px;
230-
height: 36px;
231-
min-height: 36px;
232-
padding: 0;
233-
margin: 0 auto;
229+
height: 40px;
230+
min-height: 40px;
231+
width: calc(var(--sidebar-collapsed-width) - 24px);
232+
padding: 0 11px;
233+
margin: 0;
234234
gap: 0;
235-
justify-content: center;
235+
justify-content: flex-start;
236236
border-radius: 10px;
237237
overflow: hidden;
238238
}

0 commit comments

Comments
 (0)