Fix media height weirdness, handle new status cards

This commit is contained in:
khr 2018-11-17 12:55:42 -08:00
parent f38a43506c
commit 739e64d2a9
1 changed files with 24 additions and 19 deletions

View File

@ -1,38 +1,31 @@
/* So we can position things absolute to it*/ /* Use 100% of the viewport width always*/
.status__content {
position:relative;
}
/* Use 30% of the viewport height always*/
.detailed-status > .media-spoiler, .detailed-status > .media-spoiler,
.status > .media-spoiler, .status > .media-spoiler,
.status .video-player, .status .video-player,
.media-gallery { .media-gallery,
max-height:30vh; .status .status-card {
height:30vh !important;
position:relative;
margin-top:20px; margin-top:20px;
margin-left:-68px; margin-left:-68px;
width: calc(100% + 80px); width: calc(100% + 80px);
} }
/* Unset max-width for spoilers and the video /* Unset max-width for spoilers and the video player */
* player */
.detailed-status > .media-spoiler, .detailed-status > .media-spoiler,
.status > .media-spoiler, .status > .media-spoiler,
.video-player { .video-player {
max-width: none; max-width: none;
} }
/* If there's no status text, add an extra margin on top */
.detailed-status .media-spoiler, .status .status__info + .media-gallery,
.status .media-spoiler { .status .status__info + .media-spoiler,
height:30vh !important; .status .status__info + .video-player,
vertical-align:middle; .status .status__info + .status-card {
margin-top: 40px;
} }
/* Undo transforms on videos inside the video player */
.status__video-player-video { .status__video-player-video {
transform:unset; transform:unset;
top:unset; top:unset;
@ -45,4 +38,16 @@
width: calc(100% + 22px); width: calc(100% + 22px);
} }
.public-layout .status {
.status__content {
min-height: 15px;
}
& > .media-spoiler,
.video-player,
.media-gallery,
.status-card {
margin-top:20px;
width: calc(100% + 94px);
margin-left: -78px;
}
}