mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
Make tags stand less out in dark mode
This commit is contained in:
parent
6c6062cc58
commit
892f08c19a
3 changed files with 14 additions and 19 deletions
|
@ -49,15 +49,16 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
on:mount={(event) => event.detail.input.focus()}
|
on:mount={(event) => event.detail.input.focus()}
|
||||||
/>
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
<span
|
<button
|
||||||
class="d-inline-flex align-items-center tag text-nowrap bg-secondary rounded ps-2 pe-1 me-1"
|
class="d-inline-flex align-items-center tag text-nowrap rounded ps-2 pe-1 me-1"
|
||||||
|
tabindex="-1"
|
||||||
on:click={checkForActivation}
|
on:click={checkForActivation}
|
||||||
>
|
>
|
||||||
<span>{name}</span>
|
<span>{name}</span>
|
||||||
<Badge class="delete-icon rounded ms-1 mt-1" on:click={deleteTag}
|
<Badge class="delete-icon rounded ms-1 mt-1" on:click={deleteTag}
|
||||||
>{@html deleteIcon}</Badge
|
>{@html deleteIcon}</Badge
|
||||||
>
|
>
|
||||||
</span>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@ -66,4 +67,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
.tag :global(.delete-icon > svg:hover) {
|
.tag :global(.delete-icon > svg:hover) {
|
||||||
background-color: $white-translucent;
|
background-color: $white-translucent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -3,16 +3,16 @@ Copyright: Ankitects Pty Ltd and contributors
|
||||||
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
-->
|
-->
|
||||||
<script lang="typescript">
|
<script lang="typescript">
|
||||||
|
import ButtonToolbar from "components/ButtonToolbar.svelte";
|
||||||
import DropdownMenu from "components/DropdownMenu.svelte";
|
import DropdownMenu from "components/DropdownMenu.svelte";
|
||||||
import DropdownItem from "components/DropdownItem.svelte";
|
import DropdownItem from "components/DropdownItem.svelte";
|
||||||
|
|
||||||
export const suggestions = ["en::idioms", "anki::functionality", "math"];
|
export const suggestions = ["en::idioms", "anki::functionality", "math"];
|
||||||
|
export let size: number;
|
||||||
|
|
||||||
let className: string = "";
|
let className: string = "";
|
||||||
export { className as class };
|
export { className as class };
|
||||||
|
|
||||||
let menu: HTMLDivElement;
|
|
||||||
|
|
||||||
function switchUpDown(event: KeyboardEvent): void {
|
function switchUpDown(event: KeyboardEvent): void {
|
||||||
const target = event.currentTarget as HTMLButtonElement;
|
const target = event.currentTarget as HTMLButtonElement;
|
||||||
if (event.code === "ArrowUp") {
|
if (event.code === "ArrowUp") {
|
||||||
|
@ -33,7 +33,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
function updateActiveItem(even: FocusEvent): void {}
|
function updateActiveItem(even: FocusEvent): void {}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div bind:this={menu} class={`dropup dropdown-reverse ${className}`}>
|
<ButtonToolbar class={`dropup ${className}`} {size}>
|
||||||
<slot />
|
<slot />
|
||||||
|
|
||||||
<DropdownMenu class="d-flex flex-column-reverse">
|
<DropdownMenu class="d-flex flex-column-reverse">
|
||||||
|
@ -43,10 +43,4 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
>
|
>
|
||||||
{/each}
|
{/each}
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
</div>
|
</ButtonToolbar>
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.dropdown-reverse :global(.dropdown-menu.show) {
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
@ -89,8 +89,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<StickyBottom>
|
<StickyBottom>
|
||||||
<div class="font-size-13 row-gap">
|
<div class="row-gap">
|
||||||
<TagAutocomplete class="d-flex flex-wrap align-items-center">
|
<TagAutocomplete class="d-flex flex-wrap align-items-center" {size}>
|
||||||
<AddTagBadge on:click={focusNewInput} />
|
<AddTagBadge on:click={focusNewInput} />
|
||||||
|
|
||||||
{#each tags as tag, index (tag.id)}
|
{#each tags as tag, index (tag.id)}
|
||||||
|
@ -116,10 +116,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
</StickyBottom>
|
</StickyBottom>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.font-size-13 {
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.row-gap > :global(.d-flex > *) {
|
.row-gap > :global(.d-flex > *) {
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue