Files
grimmory/frontend/src/app/shared/layout/layout-mobile-topbar/app.mobile-topbar.component.scss
T

140 lines
2.5 KiB
SCSS

@use "../../../../assets/layout/styles/layout/variables";
:host {
display: contents;
}
.mobile-topbar {
--topbar-title-shift: 0.375rem;
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
box-sizing: border-box;
height: 3.0625rem;
z-index: 100;
background-color: var(--color-app);
color: var(--color-text);
border-bottom: 1px solid var(--color-border);
padding:
0
calc(0.6563rem + env(safe-area-inset-right))
0
calc(0.6563rem + env(safe-area-inset-left));
align-items: center;
justify-content: space-between;
gap: 0.4375rem;
}
.mobile-topbar-center {
position: relative;
display: flex;
align-items: center;
justify-content: center;
flex: 1 1 auto;
min-width: 0;
height: 100%;
}
.mobile-topbar-brand {
display: flex;
align-items: center;
justify-content: center;
min-width: 0;
gap: 0.35rem;
transition: opacity 0.2s ease, transform 0.2s ease;
&.is-faded {
opacity: 0;
transform: translateY(calc(-1 * var(--topbar-title-shift)));
pointer-events: none;
}
}
.mobile-topbar-title {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
padding: 0 0.5rem;
opacity: 0;
transform: translateY(var(--topbar-title-shift));
pointer-events: none;
transition: opacity 0.2s ease, transform 0.2s ease;
&.is-visible {
opacity: 1;
transform: translateY(0);
pointer-events: auto;
}
}
.mobile-topbar-title-text {
min-width: 0;
max-width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 1.0313rem;
font-weight: 600;
line-height: 1.4;
}
@media (prefers-reduced-motion: reduce) {
.mobile-topbar {
--topbar-title-shift: 0;
}
}
.mobile-topbar-brand-icon {
width: auto;
height: 1.5313rem;
flex-shrink: 0;
transform: translateY(1px);
}
.mobile-topbar-brand-text {
font-size: 1.0938rem;
font-weight: 600;
line-height: 1;
white-space: nowrap;
}
.mobile-topbar-button {
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 2.1875rem;
height: 2.1875rem;
padding: 0;
border: 0;
background: none;
border-radius: 6px;
cursor: pointer;
transition: background-color 0.15s ease, color 0.15s ease;
&:hover {
background-color: var(--color-surface-hover);
}
&:focus-visible {
outline: 2px solid var(--color-primary);
outline-offset: 2px;
}
svg {
width: 1.0938rem;
height: 1.0938rem;
}
}
@media #{variables.$mobile-shell-media-query} {
.mobile-topbar {
display: flex;
}
}