always fit video player
This commit is contained in:
parent
7f37d370dd
commit
f445ee8b9c
4 changed files with 10 additions and 0 deletions
|
@ -137,6 +137,7 @@ export default function FileViewer(props: Props) {
|
|||
<div
|
||||
className={classnames('content__viewer', {
|
||||
'content__viewer--floating': !inline,
|
||||
'content__viewer--inline': inline,
|
||||
})}
|
||||
style={
|
||||
inline && fileViewerRect
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
top: var(--spacing-large);
|
||||
}
|
||||
|
||||
.content__viewer--inline {
|
||||
max-height: var(--inline-player-max-height);
|
||||
}
|
||||
|
||||
.content__viewer--floating {
|
||||
position: fixed;
|
||||
margin-bottom: 0;
|
||||
|
@ -63,6 +67,7 @@
|
|||
background-position: 50% 50%;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100%;
|
||||
max-height: var(--inline-player-max-height);
|
||||
margin: auto;
|
||||
|
||||
&:not(.card__media--nsfw) {
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
height: 100%;
|
||||
z-index: 1;
|
||||
overflow: hidden;
|
||||
max-height: var(--inline-player-max-height);
|
||||
}
|
||||
|
||||
.file-render__viewer {
|
||||
|
|
|
@ -79,6 +79,9 @@ $large-breakpoint: 1921px;
|
|||
// Header
|
||||
--header-height: 5rem;
|
||||
|
||||
// Inline Player
|
||||
--inline-player-max-height: calc(100vh - var(--header-height) - var(--spacing-large) * 2);
|
||||
|
||||
// Card
|
||||
--card-radius: 5px;
|
||||
--card-max-width: 1000px;
|
||||
|
|
Loading…
Add table
Reference in a new issue