This is an attempt to address the feedback in https://github.com/vector-im/element-call/pull/1099#discussion_r1226863404 that the video grid and video tile components have become too tightly coupled. After this change, the only requirements that the video grid makes of its child components are: - They accept ref, style, and item props - They attach the ref and styles to a react-spring animated element Note: I removed the video grid Storybook file, because I'm not aware of anyone using Storybook for development of Element Call beyond Robert, and it would take some effort to fix to work with these changes.
112 lines
2.4 KiB
CSS
112 lines
2.4 KiB
CSS
/*
|
|
Copyright 2021 New Vector Ltd
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
.inRoom {
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
min-height: 100%;
|
|
height: 100%;
|
|
width: 100%;
|
|
--footerPadding: 8px;
|
|
--footerHeight: calc(50px + 2 * var(--footerPadding));
|
|
}
|
|
|
|
.controlsOverlay {
|
|
position: relative;
|
|
flex: 1;
|
|
display: flex;
|
|
}
|
|
|
|
.centerMessage {
|
|
display: flex;
|
|
flex: 1;
|
|
justify-content: center;
|
|
align-items: center;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.centerMessage p {
|
|
display: block;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.footer {
|
|
position: absolute;
|
|
left: 0;
|
|
bottom: 0;
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding: var(--footerPadding) 0;
|
|
/* TODO: Un-hardcode these colors */
|
|
background: linear-gradient(
|
|
360deg,
|
|
#15191e 0%,
|
|
rgba(21, 25, 30, 0.9) 37%,
|
|
rgba(21, 25, 30, 0.8) 49.68%,
|
|
rgba(21, 25, 30, 0.7) 56.68%,
|
|
rgba(21, 25, 30, 0.427397) 72.92%,
|
|
rgba(21, 25, 30, 0.257534) 81.06%,
|
|
rgba(21, 25, 30, 0.136986) 87.29%,
|
|
rgba(21, 25, 30, 0.0658079) 92.4%,
|
|
rgba(21, 25, 30, 0) 100%
|
|
);
|
|
}
|
|
|
|
.footer > * {
|
|
margin-right: 30px;
|
|
}
|
|
|
|
.footer > :last-child {
|
|
margin-right: 0px;
|
|
}
|
|
|
|
.maximised .footer {
|
|
position: absolute;
|
|
width: 100%;
|
|
bottom: 0;
|
|
}
|
|
|
|
/* CSS makes us put a condition here, even though all we want to do is
|
|
unconditionally select the container so we can use cqmin units */
|
|
@container videoTile (width > 0) {
|
|
.avatar {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
/* To make avatars scale smoothly with their tiles during animations, we
|
|
override the styles set on the element */
|
|
--avatarSize: 50cqmin; /* Half of the smallest dimension of the tile */
|
|
width: var(--avatarSize) !important;
|
|
height: var(--avatarSize) !important;
|
|
border-radius: 10000px !important;
|
|
}
|
|
}
|
|
|
|
@media (min-height: 300px) {
|
|
.inRoom {
|
|
--footerPadding: 24px;
|
|
}
|
|
}
|
|
|
|
@media (min-width: 800px) {
|
|
.inRoom {
|
|
--footerPadding: 32px;
|
|
}
|
|
}
|