364 lines
7.5 KiB
CSS
364 lines
7.5 KiB
CSS
/* ---------- Sidebar ---------- */
|
|
|
|
.sidebar-rail {
|
|
position: fixed;
|
|
top: var(--header-height);
|
|
left: 0;
|
|
bottom: 0;
|
|
|
|
width: var(--sidebar-width-collapsed);
|
|
|
|
display: flex;
|
|
flex-direction: column;
|
|
|
|
background: var(--bg-void);
|
|
border-right: var(--border-width) solid var(--border-hairline);
|
|
|
|
z-index: 30;
|
|
overflow: visible;
|
|
|
|
transition: width var(--dur-base) var(--ease-standard);
|
|
}
|
|
|
|
.sidebar-rail--expanded {
|
|
width: var(--sidebar-width-expanded);
|
|
}
|
|
|
|
/* ---------- Header (app name + toggle) ---------- */
|
|
|
|
.sidebar-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
flex: 0 0 auto;
|
|
padding: var(--space-1);
|
|
height: var(--header-height);
|
|
}
|
|
|
|
.sidebar-rail--expanded .sidebar-header {
|
|
justify-content: space-between;
|
|
padding-inline: var(--space-3);
|
|
}
|
|
|
|
.sidebar-toggle {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex: 0 0 auto;
|
|
|
|
aspect-ratio: 1;
|
|
height: calc(var(--header-height) * 0.7);
|
|
|
|
border: var(--border-width-active) solid transparent;
|
|
border-radius: var(--radius-pill);
|
|
|
|
background: var(--bg-void);
|
|
color: var(--text-muted);
|
|
|
|
cursor: pointer;
|
|
padding: 0;
|
|
|
|
transition:
|
|
background var(--dur-base) var(--ease-standard),
|
|
color var(--dur-base) var(--ease-standard),
|
|
border-color var(--dur-base) var(--ease-standard);
|
|
}
|
|
|
|
.sidebar-toggle:hover {
|
|
background: var(--bg-raised);
|
|
color: var(--text-primary);
|
|
border-color: var(--accent-brand);
|
|
}
|
|
|
|
.sidebar-toggle-icon {
|
|
aspect-ratio: 1;
|
|
width: 70%;
|
|
transition: transform var(--dur-base) var(--ease-standard);
|
|
}
|
|
|
|
.sidebar-rail--expanded .sidebar-toggle-icon {
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
.sidebar-app-combobox {
|
|
position: relative;
|
|
flex: 1 1 auto;
|
|
min-width: 0;
|
|
|
|
opacity: 0;
|
|
max-width: 0;
|
|
pointer-events: none;
|
|
|
|
transition:
|
|
opacity var(--dur-fast) var(--ease-standard),
|
|
max-width var(--dur-base) var(--ease-standard);
|
|
}
|
|
|
|
.sidebar-rail--expanded .sidebar-app-combobox {
|
|
opacity: 1;
|
|
max-width: 200px;
|
|
pointer-events: auto;
|
|
transition-delay: var(--dur-fast);
|
|
}
|
|
|
|
.sidebar-app-trigger {
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--space-2);
|
|
|
|
height: calc(var(--header-height) * 0.6);
|
|
padding: 0 var(--space-2);
|
|
|
|
background: var(--bg-panel);
|
|
border: var(--border-width) solid var(--border-hairline);
|
|
border-radius: var(--radius-sm);
|
|
|
|
color: var(--text-primary);
|
|
font-family: var(--font-ui);
|
|
font-size: var(--font-xs);
|
|
font-weight: var(--font-weight-semibold);
|
|
|
|
cursor: pointer;
|
|
transition: border-color var(--dur-base) var(--ease-standard);
|
|
}
|
|
|
|
.sidebar-app-trigger:hover,
|
|
.sidebar-app-trigger--open {
|
|
border-color: var(--accent-brand);
|
|
}
|
|
|
|
.sidebar-app-trigger-label {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.sidebar-app-trigger-caret {
|
|
flex-shrink: 0;
|
|
color: var(--text-muted);
|
|
transition: transform var(--dur-base) var(--ease-standard);
|
|
}
|
|
|
|
.sidebar-app-trigger--open .sidebar-app-trigger-caret {
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
.sidebar-app-input {
|
|
width: 100%;
|
|
height: calc(var(--header-height) * 0.6);
|
|
padding: 0 var(--space-2);
|
|
|
|
background: var(--bg-panel);
|
|
border: var(--border-width) solid var(--accent-brand);
|
|
border-radius: var(--radius-sm);
|
|
|
|
color: var(--text-primary);
|
|
font-family: var(--font-ui);
|
|
font-size: var(--font-xs);
|
|
font-weight: var(--font-weight-semibold);
|
|
|
|
outline: none;
|
|
}
|
|
|
|
.sidebar-app-listbox {
|
|
position: absolute;
|
|
top: calc(100% + var(--space-1));
|
|
left: 0;
|
|
right: 0;
|
|
z-index: 40;
|
|
|
|
margin: 0;
|
|
padding: var(--space-1);
|
|
list-style: none;
|
|
|
|
background: var(--bg-panel);
|
|
border: var(--border-width) solid var(--border-hairline);
|
|
border-radius: var(--radius-sm);
|
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
|
|
|
|
max-height: 240px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.sidebar-app-option {
|
|
padding: var(--space-2);
|
|
border-radius: var(--radius-sm);
|
|
font-size: var(--font-xs);
|
|
color: var(--text-primary);
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.sidebar-app-option--highlight {
|
|
background: var(--bg-raised);
|
|
}
|
|
|
|
.sidebar-app-option--selected {
|
|
color: var(--accent-brand);
|
|
font-weight: var(--font-weight-semibold);
|
|
}
|
|
.sidebar-rail--expanded .sidebar-app-select {
|
|
opacity: 1;
|
|
max-width: 200px;
|
|
padding-inline: var(--space-2);
|
|
pointer-events: auto;
|
|
transition-delay: var(--dur-fast);
|
|
}
|
|
|
|
/* ---------- Scroll ---------- */
|
|
|
|
.sidebar-scroll {
|
|
flex: 1 1 auto;
|
|
min-height: 0;
|
|
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: var(--space-1);
|
|
|
|
padding-block: var(--space-1) var(--space-3);
|
|
overflow-y: auto;
|
|
|
|
-webkit-mask-image: linear-gradient(to bottom, transparent, black 0);
|
|
mask-image: linear-gradient(to bottom, transparent, black 0);
|
|
}
|
|
|
|
.sidebar-rail--expanded .sidebar-scroll {
|
|
align-items: stretch;
|
|
padding-inline: var(--space-2);
|
|
}
|
|
|
|
.sidebar-scroll[data-fade-top='true'] {
|
|
-webkit-mask-image: linear-gradient(
|
|
to bottom,
|
|
transparent,
|
|
black 24px,
|
|
black calc(100% - 24px),
|
|
black
|
|
);
|
|
mask-image: linear-gradient(to bottom, transparent, black 24px, black calc(100% - 24px), black);
|
|
}
|
|
.sidebar-scroll[data-fade-bottom='true'] {
|
|
-webkit-mask-image: linear-gradient(to bottom, black, black calc(100% - 24px), transparent);
|
|
mask-image: linear-gradient(to bottom, black, black calc(100% - 24px), transparent);
|
|
}
|
|
.sidebar-scroll[data-fade-top='true'][data-fade-bottom='true'] {
|
|
-webkit-mask-image: linear-gradient(
|
|
to bottom,
|
|
transparent,
|
|
black 24px,
|
|
black calc(100% - 24px),
|
|
transparent
|
|
);
|
|
mask-image: linear-gradient(
|
|
to bottom,
|
|
transparent,
|
|
black 24px,
|
|
black calc(100% - 24px),
|
|
transparent
|
|
);
|
|
}
|
|
|
|
/* ---------- Item ---------- */
|
|
|
|
.sidebar-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--sidebar-item-gap);
|
|
|
|
aspect-ratio: 1;
|
|
height: calc(var(--header-height) * 0.7);
|
|
|
|
border: var(--border-width-active) solid transparent;
|
|
border-radius: var(--radius-lg);
|
|
|
|
background: transparent;
|
|
color: var(--text-muted);
|
|
|
|
cursor: pointer;
|
|
|
|
transition:
|
|
background var(--dur-base) var(--ease-standard),
|
|
color var(--dur-base) var(--ease-standard),
|
|
border-color var(--dur-base) var(--ease-standard);
|
|
}
|
|
|
|
.sidebar-item:hover {
|
|
background: var(--bg-raised);
|
|
color: var(--text-primary);
|
|
border: var(--border-width-active) solid var(--accent-brand);
|
|
}
|
|
|
|
.sidebar-item--active {
|
|
border-color: var(--accent-brand);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.sidebar-rail--expanded .sidebar-item {
|
|
width: 100%;
|
|
justify-content: flex-start;
|
|
padding-inline: var(--space-2);
|
|
}
|
|
|
|
/* ---------- Icon ---------- */
|
|
|
|
.sidebar-icon {
|
|
aspect-ratio: 1;
|
|
height: 80%;
|
|
flex-shrink: 0;
|
|
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
color: currentColor;
|
|
}
|
|
|
|
.sidebar-icon svg {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: block;
|
|
stroke: currentColor;
|
|
fill: none;
|
|
}
|
|
|
|
/* ---------- Label ---------- */
|
|
|
|
.sidebar-label {
|
|
font-size: var(--font-sm);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
|
|
flex: 1 1 auto;
|
|
min-width: 0;
|
|
|
|
opacity: 0;
|
|
max-width: 0;
|
|
|
|
transition:
|
|
opacity var(--dur-fast) var(--ease-standard),
|
|
max-width var(--dur-base) var(--ease-standard);
|
|
}
|
|
|
|
.sidebar-rail--expanded .sidebar-label {
|
|
opacity: 1;
|
|
max-width: 200px;
|
|
}
|
|
|
|
/* ---------- Content ---------- */
|
|
|
|
.stage--with-sidebar {
|
|
margin-left: var(--sidebar-width-collapsed);
|
|
transition: margin-left var(--dur-base) var(--ease-standard);
|
|
}
|
|
|
|
.app-root--sidebar-expanded .stage--with-sidebar {
|
|
margin-left: var(--sidebar-width-expanded);
|
|
}
|