/* SPDX-License-Identifier: AGPL-3.0-or-later */
/* Shared menu styles used by webview-menu, context-menu and system-menu */
menu {
/*
); they offset the box from the
position the viewport clamp computes. */
margin: 0;
background: var(--bg-menu, oklch(98% 0.008 105));
border: 1px solid var(--color-border, oklch(50% 0.02 105 / 0.18));
border-radius: var(--radius-sm, 0.5em);
box-shadow: 0 4px 16px var(--color-shadow-menu, oklch(35% 0.03 105 / 0.12));
min-width: var(--size-menu-width, 12rem);
overflow: hidden;
font-family: var(--font-family-base, sans-serif);
font-size: var(--font-size-md, 0.875rem);
padding-left: 0;
animation: menu-in 0.15s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1));
transform-origin: top left;
}
menu li {
display: flex;
align-items: center;
gap: var(--spacing-2xl, 2em);
padding: var(--spacing-md, 0.5em) var(--spacing-2xl, 2em);
cursor: pointer;
color: var(--color-text-menu, oklch(22% 0.02 105));
white-space: nowrap;
transition: background var(--transition-fast, 120ms);
}
/* A label longer than the menu's max-width clips, never pushes offscreen. */
menu li > span:last-child {
overflow: hidden;
}
menu li.menu-separator {
height: 1px;
background: var(--color-border, oklch(50% 0.02 105 / 0.18));
margin: var(--spacing-xs, 0.25em);
padding: 0;
pointer-events: none;
}
menu li.group-header {
font-size: var(--font-size-xs, 0.6875rem);
color: var(--color-text-tertiary, oklch(58% 0.01 105));
cursor: default;
pointer-events: none;
}
menu li.group-header:hover {
background: none;
}
menu li:hover {
background: var(--color-menu-item-hover, oklch(70% 0.04 105 / 0.2));
}
menu li.danger,
menu li.danger lucide-icon {
color: var(--color-danger, oklch(52% 0.15 25));
}
/* Viewport-anchored: covers the page however far it has scrolled. */
.backdrop {
position: fixed;
inset: 0;
background: transparent;
}
:host([open]) {
display: block;
}
@keyframes menu-in {
from {
opacity: 0;
transform: scale(0.95);
}
to {
opacity: 1;
transform: scale(1);
}
}