1
0
Fork 0

Make media modal sheet max

This commit is contained in:
Lim Chee Aun 2023-01-13 17:23:18 +08:00
parent 45c107d403
commit d9096ce831
3 changed files with 26 additions and 2 deletions

View file

@ -657,6 +657,13 @@ button.carousel-dot[disabled].active {
animation: slide-up 0.3s var(--timing-function); animation: slide-up 0.3s var(--timing-function);
border: 1px solid var(--outline-color); border: 1px solid var(--outline-color);
} }
.sheet-max {
width: 90vw;
width: 90dvw;
max-width: none;
height: 90vh;
height: 90dvh;
}
.sheet header { .sheet header {
padding: 16px 16px 8px; padding: 16px 16px 8px;
padding-left: max(16px, env(safe-area-inset-left)); padding-left: max(16px, env(safe-area-inset-left));

View file

@ -413,11 +413,11 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex: 1; flex: 1;
gap: 8px;
} }
#media-sheet textarea { #media-sheet textarea {
width: 100%; width: 100%;
height: 10em; height: 10em;
margin-top: 8px;
} }
#media-sheet .media-preview { #media-sheet .media-preview {
border: 2px solid var(--outline-color); border: 2px solid var(--outline-color);
@ -443,3 +443,20 @@
object-fit: contain; object-fit: contain;
vertical-align: middle; vertical-align: middle;
} }
@media (min-width: 50em) {
#media-sheet main {
flex-direction: row;
}
#media-sheet .media-preview {
flex: 2;
}
#media-sheet .media-preview > * {
max-height: none;
}
#media-sheet textarea {
flex: 1;
min-height: 100%;
height: auto;
}
}

View file

@ -1263,7 +1263,7 @@ function MediaAttachment({
} }
}} }}
> >
<div id="media-sheet" class="sheet"> <div id="media-sheet" class="sheet sheet-max">
<header> <header>
<h2> <h2>
{ {