From eb9b9bc1d3e72064ffe71efa0f649f0719a77525 Mon Sep 17 00:00:00 2001 From: Xylight Date: Sat, 15 Nov 2025 22:06:03 -0800 Subject: [PATCH] design: distinguish multi/single choice polls with shapes --- src/lib/feature/post/media/PostPoll.svelte | 31 +++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/lib/feature/post/media/PostPoll.svelte b/src/lib/feature/post/media/PostPoll.svelte index fd5c1ce9..0c65a353 100644 --- a/src/lib/feature/post/media/PostPoll.svelte +++ b/src/lib/feature/post/media/PostPoll.svelte @@ -91,6 +91,7 @@ {@const percentage = Math.floor( (choice.num_votes / totalVotes || 0) * 100, )} + {@const multi = post.poll.mode != 'single'}
  • - {#if post.poll.mode == 'single'} + {#if !multi} {/if} +
    +
    +
    {choice.choice_text}
    @@ -178,6 +184,29 @@ } } + .choice-indicator { + width: calc(var(--spacing) * 5); + height: calc(var(--spacing) * 5); + background: var(--color-slate-100); + display: inline-grid; + place-items: center; + + @variant dark { + background: var(--color-zinc-800); + } + } + + input:checked ~ .choice-indicator > div { + width: calc(var(--spacing) * 4); + height: calc(var(--spacing) * 4); + border-radius: inherit; + background: var(--color-primary-900); + + @variant dark { + background: var(--color-primary-100); + } + } + li:has(label:focus-within) { border: 1px solid --alpha(var(--color-primary-900) / 50%);