Files
Blink/src/components/appBar/appBar.scss
T

192 lines
4.2 KiB
SCSS

.appBar {
// Limit transitions to cheaper properties; avoid animating box-shadow directly
transition: background-color $transition-time-fast;
padding: 0.8em ($page-margin - 1.7em);
z-index: 999 !important;
.flex {
// Avoid animating padding; it causes layout reflow on each frame.
transition: background-color $transition-time-fast;
// Avoid using will-change: scroll-position; it can degrade performance when misused
// will-change: opacity, transform;
border-radius: 1000px;
position: relative;
// Pseudo-element handles elevation shadow; we animate its opacity
&::after {
content: "";
position: absolute;
inset: -0.35em;
pointer-events: none;
border-radius: inherit;
@include glass-effect;
opacity: 0;
z-index: -1;
transition: all $transition-time-fast;
}
}
// Inner content wrapper that we can scale without causing layout reflow
.flex-inner {
transform-origin: top center;
transition: transform $transition-time-fast;
}
&.elevated{
.flex {
&::after {
opacity: 1;
}
}
// Apply a subtle scale to simulate shrink without layout changes
.flex-inner {
transform: scaleY(0.95);
}
}
&-avatar {
background: rgb(255 255 255 / 0.1) !important;
&-icon {
color: white;
}
}
&-text {
opacity: 0.7;
transition: opacity $transition-time-fast;
position: relative;
color: white;
text-decoration: none;
&::after {
content: "";
width: 100%;
height: 1.2px;
background: white;
opacity: 0.7;
position: absolute;
bottom: 4.6px;
left: 0;
transform: scaleX(0);
transition: transform $transition-time-fast,
background $transition-time-fast,
opacity $transition-time-fast;
}
&:hover {
opacity: 0.8;
&::after {
transform: scaleX(0.25);
opacity: 0.8;
}
}
&.active {
opacity: 1;
color: $clr-accent-default;
&::after {
transform: scaleX(0.5);
opacity: 1;
background: $clr-accent-default;
}
}
}
}
.library-drawer {
// Ensure the drawer paper itself gets the styling
&.MuiDrawer-paper {
width: 280px;
margin: 16px;
height: calc(100% - 32px) !important; // float in the middle
border-radius: 24px;
background: rgba(20, 20, 25, 0.75); // Darker, substantial base
backdrop-filter: blur(24px) saturate(180%);
border: 1px solid rgba(255, 255, 255, 0.06);
box-shadow:
0 24px 48px rgba(0, 0, 0, 0.4),
0 4px 8px rgba(0, 0, 0, 0.2);
overflow: hidden; // Contain scrollbars
}
.MuiList-root {
padding: 8px; // Reduced from 16px
gap: 2px; // Reduced gap
}
.MuiDivider-root {
border-color: rgba(255, 255, 255, 0.1);
margin: 4px 12px; // Reduced margins
}
// Navigation Items
.MuiListItemButton-root {
border-radius: 12px !important; // Slightly smaller radius
padding: 8px 12px; // Reduced padding (was 12px 16px)
margin-bottom: 2px;
transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
color: rgba(255, 255, 255, 0.6);
&:hover {
background: rgba(255, 255, 255, 0.08);
color: #fff;
transform: scale(1.02);
}
.material-symbols-rounded {
margin-right: 12px; // Reduced spacing
font-size: 22px; // Slightly smaller icons usually look better with less padding
transition: all 0.2s ease;
color: inherit;
}
.MuiListItemText-primary {
font-weight: 600;
font-size: 0.9rem; // Slightly smaller text
letter-spacing: 0.02em;
}
}
// Active State
.library-drawer-item.active {
.MuiListItemButton-root {
background: linear-gradient(90deg, rgba($clr-accent-default, 0.2), rgba($clr-accent-default, 0.05));
color: $clr-accent-default;
.material-symbols-rounded {
font-variation-settings: 'FILL' 1;
color: $clr-accent-default;
}
// Active Indicator Bar
&::before {
content: '';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
height: 24px;
width: 4px;
background: $clr-accent-default;
border-radius: 0 4px 4px 0;
}
}
}
// Custom Scrollbar for the drawer content
&::-webkit-scrollbar {
width: 4px;
}
&::-webkit-scrollbar-track {
background: transparent;
}
&::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.1);
border-radius: 4px;
&:hover {
background: rgba(255, 255, 255, 0.2);
}
}
}
.appLoading {
opacity: 0;
}