Fix position of lightbox arrows for a video

This commit is contained in:
Fedor Indutny 2023-05-22 22:24:33 +02:00 committed by GitHub
parent 759c61d06e
commit 99011b0a56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 15 deletions

View file

@ -256,17 +256,6 @@
} }
} }
&__container--has-controls {
.Lightbox__nav-next,
.Lightbox__nav-prev {
// Give some room for <video/>'s controls.
$controls-height: 64px;
padding-top: $controls-height;
height: calc(100% - $controls-height);
}
}
&__controls { &__controls {
display: flex; display: flex;
gap: 32px; gap: 32px;

View file

@ -484,7 +484,6 @@ export function Lightbox({
const caption = attachment?.caption; const caption = attachment?.caption;
let content: JSX.Element; let content: JSX.Element;
let hasControls = false;
if (!contentType) { if (!contentType) {
content = <>{children}</>; content = <>{children}</>;
} else { } else {
@ -551,8 +550,6 @@ export function Lightbox({
<source src={objectURL} /> <source src={objectURL} />
</video> </video>
); );
hasControls = true;
} else if (isUnsupportedImageType || isUnsupportedVideoType) { } else if (isUnsupportedImageType || isUnsupportedVideoType) {
content = ( content = (
<button <button
@ -590,7 +587,6 @@ export function Lightbox({
<div <div
className={classNames('Lightbox Lightbox__container', { className={classNames('Lightbox Lightbox__container', {
'Lightbox__container--zoom': isZoomed, 'Lightbox__container--zoom': isZoomed,
'Lightbox__container--has-controls': hasControls,
})} })}
onClick={(event: React.MouseEvent<HTMLDivElement>) => { onClick={(event: React.MouseEvent<HTMLDivElement>) => {
event.stopPropagation(); event.stopPropagation();