/* * @zhin.js/console-ui — viewport-level rules (the only file besides the generated tokens that may * use @media, ADR 0063 D18 / D20): overlays are portaled to , outside every container, so * whether they open as a bottom drawer depends on the viewport. * * Below 40rem (D16): popovers, menus and select lists open as bottom drawers; dialogs become * bottom drawers too; side sheets take the full width. Radix positions popper content with inline * styles on its wrapper, hence the !important. */ @media (width < 40rem) { [data-radix-popper-content-wrapper]:has(> .console-popover) { position: fixed !important; inset: auto 0 0 0 !important; transform: none !important; min-width: 0 !important; } .console-popover { width: 100% !important; max-width: none !important; max-height: min(70dvh, var(--radix-popper-available-height, 70dvh)) !important; padding-bottom: max(var(--console-popover-padding), env(safe-area-inset-bottom)); } .console-dialog { inset: auto 0 0 0; translate: none; width: 100%; max-width: none; max-height: 90dvh; padding-bottom: max(var(--console-dialog-padding), env(safe-area-inset-bottom)); } .console-dialog-footer { flex-direction: column-reverse; } .console-sheet-content[data-side="right"], .console-sheet-content[data-side="left"] { width: 100vw; border-radius: 0; } } /* * Motion (ADR 0063 D26 / D32): every animation of the package runs only when the user has no * reduced-motion preference; the reset below also stops transitions under `reduce`. */ @media (prefers-reduced-motion: no-preference) { .console-sheet-content[data-side="right"] { animation: console-sheet-in-right var(--console-motion-slow) var(--console-ease-out); } .console-sheet-content[data-side="left"] { animation: console-sheet-in-left var(--console-motion-slow) var(--console-ease-out); } .console-sheet-content[data-side="bottom"] { animation: console-sheet-in-bottom var(--console-motion-slow) var(--console-ease-out); } /* One shimmer = five slow steps (1.4s); a loop, not a transition. */ .console-skeleton::after { animation: console-skeleton-shimmer calc(var(--console-motion-slow) * 5) var(--console-ease-out) infinite; } } @media (width < 40rem) and (prefers-reduced-motion: no-preference) { .console-popover, .console-dialog { animation: console-sheet-in-bottom var(--console-motion-slow) var(--console-ease-out); } } @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }