Files
TrueGrowth/packages/drawnix/src/components/shared/VideoPosterPreview.scss
jiam 5119ac0ef8
Some checks failed
CI / main (push) Has been cancelled
CI / release-e2e (push) Has been cancelled
Sync latest TrueGrowth updates
2026-07-08 02:03:18 +08:00

64 lines
1.3 KiB
SCSS

.video-poster-preview {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
max-width: 100%;
max-height: 100%;
overflow: hidden;
&__media,
&__placeholder {
display: block;
width: 100%;
height: 100%;
position: relative;
z-index: 1;
}
&__media {
object-fit: cover;
}
&--fit-contain &__media {
object-fit: contain;
}
&--fit-contain &__placeholder {
background: linear-gradient(135deg, rgba(255, 91, 0, 0.1), transparent 52%),
rgba(15, 23, 42, 0.04);
}
&__play-overlay {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.15);
color: #fff;
opacity: 0.88;
pointer-events: none;
z-index: 2;
transition: opacity 0.2s ease, background-color 0.2s ease;
.t-icon {
filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}
}
&:hover &__play-overlay {
opacity: 1;
background: rgba(0, 0, 0, 0.25);
}
}
:root[data-tg-theme='dark']
.video-poster-preview--fit-contain
.video-poster-preview__placeholder {
background: linear-gradient(135deg, rgba(255, 138, 61, 0.14), transparent 52%),
rgba(255, 255, 255, 0.06);
}