mirror of
https://github.com/vector-im/element-call.git
synced 2026-11-07 00:52:28 +00:00
- The camera menu's blur toggle becomes a Background effects section under the cameras: no effect, blur and the two shipped backgrounds as one radio choice of tiles, three across. It scrolls with the device list, so it stays reachable in a short call, and choosing keeps the menu open. The lobby gets it too, as both render the same footer. - The footer's view model gives the options, the notice and the actions; the footer only names them. - Each tile is Compound's MenuItem as a menuitemradio, styled as a tile. Compound makes it an item of the dropdown, so the arrow keys walk the tiles with the device rows, and takes its tap in the phone drawer. A tile that can't be chosen has no select handler, so the keyboard passes over it. - Where the browser can't run effects the tiles are shown, disabled and explained by a notice the group is described by. No effect stays choosable and shows as in force. The notice is in the scrolling list, so a short call doesn't push the menu out of it. - Section headings are raised, or the positioned tiles scroll over the one they sit under; raised within the list only, so the menu's frame stays over them. Tiles clip with overflow: clip; with hidden they are scroll containers, which focus scrolls into view without their border. - End to end on Chromium and Firefox: a shipped background chosen in the lobby shows in the preview, and None after Blur draws nothing, counted in WebGL draws (Blur: about 1400 a second on Chromium, 2300 on Firefox). - The Quick Audio Menu's test of the camera menu keeps its name and now finds blur among the effects rather than as a toggle. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
96 lines
2.5 KiB
CSS
96 lines
2.5 KiB
CSS
/*
|
|
Copyright 2026 Element Creations Ltd.
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
Please see LICENSE in the repository root for full details.
|
|
*/
|
|
|
|
.container {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
background-color: var(--cpd-color-bg-subtle-secondary);
|
|
border-radius: 32px;
|
|
transition: background-color 0.2s ease-in-out;
|
|
}
|
|
.containerOpen {
|
|
background-color: var(--cpd-color-bg-action-primary-pressed);
|
|
}
|
|
.chevronIconOpen > svg {
|
|
color: var(--cpd-color-icon-on-solid-primary);
|
|
}
|
|
.menuButton {
|
|
width: 40px;
|
|
background-color: transparent !important;
|
|
}
|
|
.itemIcon {
|
|
color: var(--cpd-color-text-secondary);
|
|
}
|
|
|
|
.rotate {
|
|
animation: spinner 1.5s linear infinite;
|
|
}
|
|
@keyframes spinner {
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
/* The width design sets: a long device name wraps. */
|
|
.menu {
|
|
inline-size: 296px;
|
|
}
|
|
|
|
/* Its share of the measured call area: the menu is portalled out of the root,
|
|
so CSS can't size it against the call. */
|
|
.deviceList {
|
|
max-block-size: var(--device-list-max-height);
|
|
/* The raised headings stay raised within the list, under the menu's frame. */
|
|
isolation: isolate;
|
|
}
|
|
|
|
/* Compound's heading rule heads each section; the design adds space below it. */
|
|
.menu h3 {
|
|
margin-block-end: var(--cpd-space-5x);
|
|
}
|
|
|
|
/* And more above a heading that follows another section. */
|
|
.deviceList [role="group"] + [role="group"] h3 {
|
|
margin-block-start: var(--cpd-space-7x);
|
|
}
|
|
|
|
/* Raised, or the positioned effect tiles scroll over the heading they sit
|
|
under. Compound's sticky heading is the section's aria-hidden first child. */
|
|
.deviceList [role="group"] > [aria-hidden="true"]:first-child {
|
|
z-index: 1;
|
|
}
|
|
|
|
/* Radix focuses whatever the pointer is over, so the browser's ring would
|
|
follow the mouse. Replaced by one shown only for keyboard focus. */
|
|
.menu [role^="menuitem"]:focus,
|
|
.menu [role^="menuitem"]:focus-visible {
|
|
outline: none;
|
|
}
|
|
|
|
.menu[data-focus-source="keyboard"] [role^="menuitem"]:focus {
|
|
outline: var(--cpd-border-width-2) solid var(--cpd-color-border-focused);
|
|
outline-offset: calc(-1 * var(--cpd-border-width-2));
|
|
}
|
|
|
|
.notice {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: var(--cpd-space-3x);
|
|
margin: var(--cpd-space-2x) var(--cpd-space-4x) 0;
|
|
padding: var(--cpd-space-3x);
|
|
border-radius: var(--cpd-space-2x);
|
|
background: var(--cpd-color-bg-subtle-secondary);
|
|
color: var(--cpd-color-text-primary);
|
|
font: var(--cpd-font-body-md-regular);
|
|
}
|
|
|
|
.notice > svg {
|
|
flex-shrink: 0;
|
|
color: var(--cpd-color-icon-secondary);
|
|
}
|