fix(nav): prevent icon jump on sidebar close (#8866)

This commit is contained in:
Lane Sawyer 2026-07-09 07:21:56 -07:00 committed by GitHub
parent 84bedacd22
commit 0f397cd9b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -39,7 +39,9 @@ import { HISTORY_STATE } from '../../app.constants';
import { SwipeDirective } from '../../ui/swipe-gesture/swipe.directive';
import { DataInitStateService } from '../../core/data-init/data-init-state.service';
const COLLAPSED_WIDTH = 64;
// 56px = 24px icon + 16px (var(--s2)) padding on each side, so the left-aligned
// nav icons sit centered in the collapsed rail.
const COLLAPSED_WIDTH = 56;
const MOBILE_NAV_WIDTH = 300;
const FOCUS_DELAY_MS = 10;
const INITIAL_ENTER_ANIMATION_DURATION_MS = 425;

View file

@ -294,8 +294,7 @@ button[mat-menu-item].nav-link.active {
:host-context(.nav-sidenav.compactMode) {
.nav-link {
justify-content: center;
padding: 12px;
justify-content: flex-start;
&:focus,
&:hover {
@ -305,7 +304,7 @@ button[mat-menu-item].nav-link.active {
::ng-deep .mat-mdc-menu-item-text {
display: flex;
justify-content: center;
justify-content: flex-start;
width: 100%;
padding: 0;