Skip to content

Commit

Permalink
Use a consistent background colour for video tiles and avatars (#2868)
Browse files Browse the repository at this point in the history
  • Loading branch information
hughns authored Dec 5, 2024
1 parent d09efa3 commit 21b62db
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
5 changes: 5 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ layer(compound);
--background-gradient: url("graphics/backgroundGradient.svg");
}

:root,
[class*="cpd-theme-"] {
--video-tile-background: var(--cpd-color-bg-subtle-secondary);
}

.cpd-theme-dark {
--cpd-color-border-accent: var(--cpd-color-green-1100);
--stopgap-color-on-solid-accent: var(--cpd-color-text-primary);
Expand Down
5 changes: 2 additions & 3 deletions src/room/VideoPreview.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ Please see LICENSE in the repository root for full details.
width: 100%;
height: 100%;
object-fit: cover;
background-color: black;
background-color: var(--cpd-color-bg-subtle-primary);
background-color: var(--video-tile-background);
}

video.mirror {
Expand All @@ -35,7 +34,7 @@ video.mirror {
display: flex;
justify-content: center;
align-items: center;
background-color: var(--cpd-color-bg-subtle-secondary);
background-color: var(--video-tile-background);
}

.buttonBar {
Expand Down
4 changes: 2 additions & 2 deletions src/tile/MediaView.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Please see LICENSE in the repository root for full details.
inline-size: 100%;
block-size: 100%;
object-fit: contain;
background-color: var(--cpd-color-bg-subtle-primary);
background-color: var(--video-tile-background);
/* This transform is a no-op, but it forces Firefox to use a different
rendering path, one that actually clips the corners of <video> elements into
the intended rounded shape. We can remove this if Firefox stops being broken. */
Expand All @@ -35,7 +35,7 @@ Please see LICENSE in the repository root for full details.
}

.bg {
background-color: var(--cpd-color-bg-subtle-secondary);
background-color: var(--video-tile-background);
inline-size: 100%;
block-size: 100%;
border-radius: inherit;
Expand Down

0 comments on commit 21b62db

Please sign in to comment.