Adjust paddings a bit more

This commit is contained in:
Henrik Giesel 2021-07-01 22:15:49 +02:00
parent f2cd23ff22
commit 6642a11482
2 changed files with 14 additions and 5 deletions

View file

@ -9,6 +9,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import { deleteIcon } from "./icons";
import { controlPressed, shiftPressed } from "lib/keys";
let className: string = "";
export { className as class };
export let name: string;
export let selected: boolean = false;
@ -51,7 +54,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<svelte:body on:keydown={setDeleteIcon} on:keyup={setDeleteIcon} />
<button
class="tag btn d-inline-flex align-items-center text-nowrap rounded ps-2 pe-1 me-1"
class={`tag btn d-inline-flex align-items-center text-nowrap rounded ps-2 pe-1 ${className}`}
class:selected
class:flashing
class:select-mode={selectMode}
@ -63,7 +66,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
>
<span>{name}</span>
<Badge
class="delete-icon rounded d-flex align-items-center"
class="delete-icon rounded d-flex align-items-center ms-1"
on:click={() => {
if (!selectMode) {
deleteTag();
@ -88,7 +91,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
}
button {
padding: 0;
padding-top: 0.1rem;
padding-bottom: 0.1rem;
&:focus,
&:active {

View file

@ -362,7 +362,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
{size}
on:focusout={deselectIfLeave}
>
<div class="pb-1" on:mousedown|preventDefault>
<div class="pad" on:mousedown|preventDefault>
{#if tags.some((tag) => tag.selected)}
<SelectedTagBadge
on:tagcopy={copySelectedTags}
@ -374,8 +374,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
</div>
{#each tags as tag, index (tag.id)}
<div class="position-relative pb-1" class:hide-tag={index === active}>
<div class="position-relative pad" class:hide-tag={index === active}>
<Tag
class="me-1"
name={tag.name}
bind:flash={tag.flash}
bind:selected={tag.selected}
@ -450,4 +451,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
.hide-tag :global(.tag) {
opacity: 0;
}
.pad {
padding-bottom: 0.15rem;
}
</style>