mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
fix(embed): video sizing letterbox and logo accent
- Changed embed video sizing to `object-fit: cover` and `width: 100%` to eliminate black bars/letterboxing. - Updated `embed.html` and `css/tailwind.source.css` to enforce these styles on `.video-modal__media`, `.video-modal__video`, and `#embedVideo`. - Wired the embed logo accent color to use the instance configuration (`THEME_ACCENT_OVERRIDES` from `config/instance-config.js`) via a `--bitvid-accent` CSS variable injected in `js/embed.js`. - Added unit and visual tests to verify styling and configuration logic.
This commit is contained in:
1 parent
6c122c2fd3
commit
a708883abb
5 files changed
+109
-1
No files matched your search
@@ -6099,3 +6099,50 @@
|
||||
.no-scrollbar::-webkit-scrollbar {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Embed & Video Modal Fixes */
|
||||
@layer components {
|
||||
/* ensure the video fills the stage and doesn't show a black strip */
|
||||
#embedVideo,
|
||||
.video-modal__video,
|
||||
.video-modal__video > .video-modal__media,
|
||||
.video-modal__video video#modalVideo,
|
||||
.video-modal__video .video-modal__media {
|
||||
display: block;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: cover;
|
||||
object-position: center center;
|
||||
background: transparent !important;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* make sure the stage wrapper doesn’t add bottom padding/space */
|
||||
.video-modal__stage,
|
||||
.video-modal__video {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* if there is an ambient canvas or overlay, ensure it doesn't change layout */
|
||||
.video-modal__ambient,
|
||||
.video-modal__ambient-canvas {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Logo accent wiring */
|
||||
.bv-logo__accent {
|
||||
fill: var(--bitvid-accent, var(--logo-accent-color));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user