feat: sidebar for mobiles
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
.sidebar-rail {
|
||||
position: fixed;
|
||||
top: var(--header-height);
|
||||
top: var(--topbar-h);
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
|
||||
@@ -416,3 +416,105 @@
|
||||
max-width: 200px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* ---------- Phone / touch ---------- */
|
||||
|
||||
.sidebar-backdrop {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (hover: none) {
|
||||
.sidebar-item:hover {
|
||||
background: transparent;
|
||||
color: var(--text-muted);
|
||||
border-color: transparent;
|
||||
}
|
||||
.sidebar-item--active:hover {
|
||||
color: var(--text-primary);
|
||||
border-color: var(--accent-brand);
|
||||
}
|
||||
.sidebar-toggle:hover {
|
||||
background: var(--bg-void);
|
||||
color: var(--text-muted);
|
||||
border-color: transparent;
|
||||
}
|
||||
.sidebar-app-trigger:hover {
|
||||
border-color: var(--border-hairline);
|
||||
}
|
||||
}
|
||||
|
||||
@media (pointer: coarse) {
|
||||
/* Cancel the global 44px min-height, sizes are set explicitly below */
|
||||
.sidebar-rail button {
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
/* No iOS/Android callout menu on long-press (we use it for rename) */
|
||||
.sidebar-item,
|
||||
.sidebar-app-trigger {
|
||||
-webkit-touch-callout: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.sidebar-rail {
|
||||
top: var(--topbar-h);
|
||||
bottom: 0;
|
||||
padding-bottom: var(--safe-bottom);
|
||||
padding-left: var(--safe-left);
|
||||
width: calc(var(--sidebar-width-collapsed) + var(--safe-left));
|
||||
}
|
||||
|
||||
/* Expanded = drawer on top of the content, not pushing it */
|
||||
.sidebar-rail--expanded {
|
||||
width: calc(var(--sidebar-width-expanded) + var(--safe-left));
|
||||
z-index: 50;
|
||||
box-shadow: 8px 0 24px rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
|
||||
.app-root--sidebar-expanded .sidebar-backdrop {
|
||||
display: block;
|
||||
position: fixed;
|
||||
top: var(--topbar-h);
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
z-index: 45;
|
||||
}
|
||||
|
||||
.sidebar-scroll {
|
||||
overscroll-behavior: contain;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
/* Touch-sized items */
|
||||
.sidebar-item,
|
||||
.sidebar-item--editing {
|
||||
height: 44px;
|
||||
}
|
||||
.sidebar-rail--expanded .sidebar-item {
|
||||
width: 100%;
|
||||
}
|
||||
.sidebar-toggle {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
/* Preset dropdown */
|
||||
.sidebar-app-trigger,
|
||||
.sidebar-app-input {
|
||||
height: 40px;
|
||||
}
|
||||
.sidebar-app-input,
|
||||
.sidebar-item-input {
|
||||
font-size: 16px; /* prevents iOS focus-zoom */
|
||||
}
|
||||
.sidebar-app-listbox {
|
||||
max-height: min(240px, 50dvh);
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.sidebar-app-option {
|
||||
padding: var(--space-3) var(--space-2);
|
||||
font-size: var(--font-sm);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user