feat(sidebar): collapse to icon rail, expand on hover

Sidebar is icon-only by default and expands as an overlay on hover, so the dashboard content underneath no longer reflows. Drops the persisted collapse state and the click trigger that conflicted with hover.
This commit is contained in:
MHSanaei
2026-06-03 15:24:55 +02:00
parent db5ce06256
commit 573c43e445
2 changed files with 37 additions and 27 deletions
+23
View File
@@ -5,6 +5,20 @@
align-self: flex-start;
}
.ant-sidebar.is-rail {
flex: 0 0 80px;
width: 80px;
overflow: visible;
}
.ant-sidebar.is-rail > .ant-layout-sider {
z-index: 100;
}
.ant-sidebar.is-rail:hover > .ant-layout-sider {
box-shadow: 2px 0 16px rgba(0, 0, 0, 0.18);
}
.sider-brand,
.drawer-brand {
font-weight: 600;
@@ -245,6 +259,15 @@
min-width: 0 !important;
width: 0 !important;
}
.ant-sidebar,
.ant-sidebar.is-rail {
flex: 0 0 0 !important;
width: 0 !important;
min-width: 0 !important;
max-width: 0 !important;
overflow: hidden !important;
}
}
body.dark .ant-drawer-content,