From e8307d254b3d39d6d669cf3b22b91f10ac77c899 Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 16 Mar 2023 19:50:52 +0100 Subject: [PATCH] fix(task): make sure the modal close button is not overlapped with the title field --- src/components/misc/modal.vue | 5 ++--- src/components/tasks/partials/heading.vue | 6 +++++- src/styles/common-imports.scss | 2 ++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/misc/modal.vue b/src/components/misc/modal.vue index 5c1365e96..faebc7dff 100644 --- a/src/components/misc/modal.vue +++ b/src/components/misc/modal.vue @@ -193,17 +193,16 @@ $modal-width: 1024px; } .close { - $close-button-min-space: 84px; $close-button-padding: 26px; position: fixed; top: 5px; right: $close-button-padding; color: var(--grey-900); font-size: 2rem; - + @media screen and (min-width: $desktop) and (max-width: calc(#{$desktop } + #{$close-button-min-space})) { top: calc(5px + $modal-margin); - right: 50%; + right: 50%; // we align the close button to the modal until there is enough space outside for it transform: translateX(calc((#{$modal-width} / 2) - #{$close-button-padding})); } diff --git a/src/components/tasks/partials/heading.vue b/src/components/tasks/partials/heading.vue index f6a2b6d61..c3687c765 100644 --- a/src/components/tasks/partials/heading.vue +++ b/src/components/tasks/partials/heading.vue @@ -113,7 +113,7 @@ async function save(title: string) {