Files
fluxer/fluxer_app/src/features/ui/sheet/Sheet.module.css
T

289 lines
5.4 KiB
CSS

/* SPDX-License-Identifier: AGPL-3.0-or-later */
.overlayRoot {
--sheet-y: 100%;
--sheet-open-progress: 0;
--sheet-backdrop-alpha: 0;
--sheet-transition-duration: 220ms;
--sheet-transition-easing: cubic-bezier(0.22, 1, 0.36, 1);
--sheet-top-gap: 2.125rem;
--sheet-viewport-offset-bottom: 0px;
position: fixed;
inset: 0;
overflow: hidden;
pointer-events: none;
visibility: visible;
contain: layout style;
}
.overlayRoot[data-state='closing'] {
pointer-events: none;
}
.backdrop {
position: fixed;
inset: 0;
z-index: 1;
padding: 0;
border: 0;
background-color: rgb(0 0 0 / var(--sheet-backdrop-alpha));
pointer-events: auto;
transition: background-color var(--sheet-transition-duration) var(--sheet-transition-easing);
touch-action: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
}
.container {
position: absolute;
inset-inline: 0;
bottom: var(--sheet-viewport-offset-bottom);
z-index: 2;
display: flex;
flex-direction: column;
width: 100%;
height: calc(var(--sheet-viewport-height, 100dvh) - env(safe-area-inset-top, 0px) - var(--sheet-top-gap));
max-height: calc(100dvh - var(--sheet-viewport-offset-bottom));
border-top-left-radius: 1.5rem;
border-top-right-radius: 1.5rem;
overflow: hidden;
color: var(--text-primary);
background-color: var(--sheet-surface, var(--background-secondary));
pointer-events: auto;
transform: translate3d(0, var(--sheet-y), 0);
transition: transform var(--sheet-transition-duration) var(--sheet-transition-easing);
will-change: transform;
touch-action: manipulation;
outline: none;
box-shadow: 0 -1rem 2.5rem rgb(0 0 0 / 0.24);
}
.overlayRoot[data-dragging='true'] .container {
cursor: grabbing;
transition-duration: 0ms;
user-select: none;
}
.overlayRoot[data-dragging='true'] .backdrop {
transition-duration: 0ms;
}
.surfacePrimary {
--sheet-surface: var(--background-primary);
}
.surfaceSecondary {
--sheet-surface: var(--background-secondary);
}
.surfaceTertiary {
--sheet-surface: var(--background-tertiary);
}
.root {
display: flex;
flex-direction: column;
height: 100%;
min-height: 0;
background-color: var(--sheet-surface, var(--background-secondary));
}
.handle {
display: flex;
width: 100%;
justify-content: center;
padding: calc(0.75rem + env(safe-area-inset-top, 0px)) 0 0.75rem;
background-color: var(--sheet-surface, var(--background-secondary));
}
.handleBar {
height: 0.25rem;
width: 2.5rem;
border-radius: 624.9375rem;
background-color: var(--text-primary-muted);
opacity: 0.5;
}
.header {
background-color: var(--sheet-surface, var(--background-secondary));
padding: 0.75rem 1rem;
}
.headerBorder {
border-bottom: 0.0625rem solid var(--background-modifier-accent);
}
.headerSafeArea {
padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
}
.headerPaddingSm {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
.headerPaddingMd {
padding-top: 0.75rem;
padding-bottom: 0.75rem;
}
.headerPaddingLg {
padding-top: 1rem;
padding-bottom: 1rem;
}
.headerGrid {
display: grid;
grid-template-columns: minmax(2.75rem, auto) minmax(0, 1fr) minmax(2.75rem, auto);
align-items: center;
gap: 0.75rem;
}
.headerSlot {
display: flex;
align-items: center;
justify-content: center;
min-height: 2rem;
color: inherit;
}
.headerSlotLeading {
justify-content: flex-start;
}
.headerSlotTrailing {
justify-content: flex-end;
}
.headerCenter {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
min-width: 0;
gap: 0.25rem;
}
.headerAlignStart .headerCenter {
align-items: flex-start;
text-align: left;
}
.headerAlignEnd .headerCenter {
align-items: flex-end;
text-align: right;
}
.headerContent {
min-width: 0;
}
.headerAfter {
margin-top: 0.75rem;
width: 100%;
}
.title {
margin: 0;
font-weight: 600;
font-size: 1.125rem;
color: var(--text-primary);
}
.subtitle {
margin: 0;
font-size: 0.875rem;
color: var(--text-secondary);
}
.content {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
background-color: var(--sheet-surface, var(--background-secondary));
padding: 0 1rem;
}
.contentNoPadding {
padding: 0;
}
.contentInner {
flex: 1;
min-height: 0;
overflow-y: auto;
overflow-x: hidden;
overscroll-behavior: contain;
-webkit-overflow-scrolling: touch;
padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}
.contentNoPadding .contentInner {
padding-bottom: 0;
}
.contentStatic {
overflow: visible;
}
.section {
padding: 1rem;
background-color: var(--sheet-surface, var(--background-secondary));
}
.footer {
padding: 1rem;
padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
background-color: var(--sheet-surface, var(--background-secondary));
}
.footerNoBorder {
border-top: none;
}
.actions {
display: flex;
align-items: center;
gap: 0.5rem;
justify-content: flex-end;
}
.divider {
height: 0.0625rem;
width: 100%;
background-color: var(--background-header-secondary);
opacity: 0.6;
}
.closeButton {
display: flex;
align-items: center;
justify-content: center;
padding: 0.5rem;
color: var(--text-primary);
border-radius: 50%;
transition: background-color 0.15s;
cursor: pointer;
}
.closeButton:hover {
background-color: var(--background-modifier-hover);
}
.closeButton:active {
background-color: var(--background-modifier-selected);
}
.closeButton svg {
width: 1.25rem;
height: 1.25rem;
}
@media (prefers-reduced-motion: reduce) {
.overlayRoot {
--sheet-transition-duration: 1ms;
}
}