From df737d6c717fefd60397543526596d9444be598f Mon Sep 17 00:00:00 2001 From: jonasled <git@jonasled.de> Date: Mon, 15 Mar 2021 17:10:22 +0100 Subject: [PATCH] fix img preview dialog --- scss/_dialog.scss | 22 +++++++++++----------- ts/dialog.ts | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scss/_dialog.scss b/scss/_dialog.scss index fdfb7a1..5a70a18 100644 --- a/scss/_dialog.scss +++ b/scss/_dialog.scss @@ -6,18 +6,21 @@ top: 0; left: 0; - display: flex; - justify-content: center; - align-items: center; - background-color: rgba(0, 0, 0, 0.5); .dialogContent { - max-height: 80%; - max-width: 80%; + position:relative; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + max-height: max-content; + max-width: max-content; background-color: white; border: 10px solid rgb(86, 86, 86); border-radius: 10px; + display: flex; + width: 80%; + height: 80%; iframe { width: 100%; @@ -27,12 +30,9 @@ } .imageDialog{ - height: auto; - width: auto; img { - display: block; - width: 100%; - height: 100%; + max-width: 100%; + max-height: 100%; } } } diff --git a/ts/dialog.ts b/ts/dialog.ts index 8e1dcc4..9e4ccd8 100644 --- a/ts/dialog.ts +++ b/ts/dialog.ts @@ -15,7 +15,7 @@ function createDialogHTML(html:string, customClasses = "") { dialog.innerHTML = ` <div class="dialogContent ${customClasses}"> - <a class="dialogClose"></a> + <!-- <a class="dialogClose"></a> --> ${html} </div>`; -- GitLab