mirror of
https://github.com/element-hq/element-call.git
synced 2026-09-10 11:35:44 +00:00
"Embedded" already means something here: the embedded package is the widget build. Where a comment meant Element Call running as a React component inside a host application, it now says so, and the params it starts from are `componentProperties`. "Host" stays the word for the application on the other side, whether that is a widget container or an application rendering the component. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
44 lines
1.7 KiB
CSS
44 lines
1.7 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.
|
|
*/
|
|
|
|
/* The container a host mounts us into. It fills whatever space the host gives
|
|
it, and nothing we draw may leave it.
|
|
|
|
That takes two separate things, which are easy to mistake for one. `isolation`
|
|
gives us a stacking context, so nothing inside can be layered above the host's
|
|
own interface. Containment makes us the containing block for `position: fixed`
|
|
descendants, and clips what we paint to our own box: without it, the modal
|
|
scrim and dialog — which are positioned `fixed` and centred, since in the app
|
|
they are meant to cover the page — resolve against the viewport and appear in
|
|
the middle of the host's window rather than in the middle of the call.
|
|
|
|
The clipping cuts both ways: a menu near the edge of a small container is
|
|
trimmed rather than overflowing into the host. That is the trade being a
|
|
component rather than a page makes. */
|
|
.root {
|
|
display: flex;
|
|
flex-direction: column;
|
|
inline-size: 100%;
|
|
block-size: 100%;
|
|
isolation: isolate;
|
|
contain: layout paint;
|
|
position: relative;
|
|
background-color: var(--cpd-color-bg-canvas-default);
|
|
color: var(--cpd-color-text-primary);
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
/* Compound's overlay container, which holds tooltips and popovers, has to fill
|
|
the container for the elements inside it to be positioned against it. The
|
|
standalone page does the same for the container under `#root`. */
|
|
.root > [data-overlay-container] {
|
|
position: relative;
|
|
block-size: 100%;
|
|
}
|