From f2cd23ff22b546cac3509b9876ff58a50309139a Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Thu, 1 Jul 2021 21:59:57 +0200 Subject: [PATCH] Center delete icon without padding/margin --- ts/editor/Tag.svelte | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/ts/editor/Tag.svelte b/ts/editor/Tag.svelte index 53008cc57..3144ae7f8 100644 --- a/ts/editor/Tag.svelte +++ b/ts/editor/Tag.svelte @@ -63,7 +63,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html > {name} { if (!selectMode) { deleteTag(); @@ -102,29 +102,27 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html &.select-mode { cursor: crosshair; + + &:hover :global(.delete-icon) { + opacity: 0; + } + } + + &.selected { + box-shadow: 0 0 0 0.25rem transparentize(button.$focus-color, 0.5) !important; } } - .selected { - box-shadow: 0 0 0 0.25rem transparentize(button.$focus-color, 0.5) !important; - } + :global(.delete-icon > svg:hover) { + $white-translucent: rgba(255 255 255 / 0.5); + $dark-translucent: rgba(0 0 0 / 0.2); - :global(.delete-icon) { - .select-mode:hover & { - opacity: 0; + .btn-day & { + background-color: $dark-translucent; } - > :global(svg:hover) { - $white-translucent: rgba(255 255 255 / 0.5); - $dark-translucent: rgba(0 0 0 / 0.2); - - .btn-day & { - background-color: $dark-translucent; - } - - .btn-night & { - background-color: $white-translucent; - } + .btn-night & { + background-color: $white-translucent; } }