/* SPDX-License-Identifier: AGPL-3.0-or-later */ @import url(beaver://shared/menu_shared.css); :host { display: none; position: fixed; inset: 0; z-index: var(--z-modal, 40); } menu { position: fixed; z-index: calc(var(--z-modal, 40) + 1); /* A menu bigger than the viewport scrolls or clips instead of overflowing. */ max-height: calc(100vh - 16px); max-width: calc(100vw - 16px); overflow-y: auto; } /* On touch screens the menu centers as an action sheet: a pointer position is too easy to put near an edge. */ @media (pointer: coarse) { menu { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); transform-origin: center; animation-name: menu-in-centered; } } @keyframes menu-in-centered { from { opacity: 0; transform: translate(-50%, -50%) scale(0.97); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } } menu li .icon-slot { width: 1em; height: 1em; display: flex; align-items: center; justify-content: center; flex-shrink: 0; /* A page line-height taller than 1 pushes the glyph below the text center; the icon centers on its own em box instead. */ line-height: 1; } menu li.disabled { opacity: 0.5; cursor: default; pointer-events: none; } menu li lucide-icon { width: 1em; height: 1em; } /* Align check icon to the right */ menu li lucide-icon[name="check"] { margin-left: auto; }