Skip to content

Commit

Permalink
Update design of collapse/expand all buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
allanlasser committed Dec 5, 2024
1 parent 4d8ea89 commit 650951c
Showing 1 changed file with 33 additions and 22 deletions.
55 changes: 33 additions & 22 deletions src/lib/components/common/HighlightGroup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,29 @@
</div>
{#if showAll}
<div class="right">
<Button
minW={false}
size="small"
ghost
on:click={collapseAll}
title={$_("search.collapseAll")}
>
<Fold16 height={12} width={12} />
{#if !isSmall}{$_("search.collapseAll")}{/if}
</Button>
<Button
minW={false}
size="small"
ghost
on:click={expandAll}
title={$_("search.expandAll")}
>
<Unfold16 height={12} width={12} />
{#if !isSmall}{$_("search.expandAll")}{/if}
</Button>
{#if open}
<Button
minW={false}
size="small"
ghost
on:click={collapseAll}
title={$_("search.collapseAll")}
>
<Fold16 height={14} width={14} />
{#if !isSmall}{$_("search.collapseAll")}{/if}
</Button>
{:else}
<Button
minW={false}
size="small"
ghost
on:click={expandAll}
title={$_("search.expandAll")}
>
<Unfold16 height={14} width={14} />
{#if !isSmall}{$_("search.expandAll")}{/if}
</Button>
{/if}
</div>
{/if}
</summary>
Expand All @@ -92,8 +95,8 @@
.highlights summary {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
gap: 0.25rem;
justify-content: flex-start;
gap: 1rem;
color: var(--gray-4);
fill: var(--gray-4);
padding: 0.5rem 0.75rem;
Expand All @@ -106,6 +109,14 @@
align-items: center;
gap: 0.5rem;
white-space: no-wrap;
padding: 0 0.5rem 0 0.25rem;
border-radius: 0.5rem;
}
summary .left:hover,
summary .left:focus,
summary:hover .left,
summary:focus .left {
background-color: var(--blue-1);
}
.highlights ul {
list-style-type: none;
Expand Down

0 comments on commit 650951c

Please sign in to comment.