mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
Center delete icon without padding/margin
This commit is contained in:
parent
201773e7c6
commit
f2cd23ff22
1 changed files with 16 additions and 18 deletions
|
@ -63,7 +63,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
>
|
>
|
||||||
<span>{name}</span>
|
<span>{name}</span>
|
||||||
<Badge
|
<Badge
|
||||||
class="delete-icon rounded ms-1 mt-1"
|
class="delete-icon rounded d-flex align-items-center"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
if (!selectMode) {
|
if (!selectMode) {
|
||||||
deleteTag();
|
deleteTag();
|
||||||
|
@ -102,29 +102,27 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
&.select-mode {
|
&.select-mode {
|
||||||
cursor: crosshair;
|
cursor: crosshair;
|
||||||
|
|
||||||
|
&:hover :global(.delete-icon) {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.selected {
|
||||||
|
box-shadow: 0 0 0 0.25rem transparentize(button.$focus-color, 0.5) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.selected {
|
:global(.delete-icon > svg:hover) {
|
||||||
box-shadow: 0 0 0 0.25rem transparentize(button.$focus-color, 0.5) !important;
|
$white-translucent: rgba(255 255 255 / 0.5);
|
||||||
}
|
$dark-translucent: rgba(0 0 0 / 0.2);
|
||||||
|
|
||||||
:global(.delete-icon) {
|
.btn-day & {
|
||||||
.select-mode:hover & {
|
background-color: $dark-translucent;
|
||||||
opacity: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
> :global(svg:hover) {
|
.btn-night & {
|
||||||
$white-translucent: rgba(255 255 255 / 0.5);
|
background-color: $white-translucent;
|
||||||
$dark-translucent: rgba(0 0 0 / 0.2);
|
|
||||||
|
|
||||||
.btn-day & {
|
|
||||||
background-color: $dark-translucent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-night & {
|
|
||||||
background-color: $white-translucent;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue