design: tweak border radius because a single person has a bad opinion

This commit is contained in:
Xylight committed 2026-05-13 20:17:25 -07:00
1 parent b7ede17ea5
commit ed227b7d1f
2 files changed
+9 -13

No files matched your search

+5 -9
View File
@@ -1,7 +1,7 @@
<script lang="ts" module>
export const voteColor = (vote: number) =>
vote == 1
? `btn-primary border-0!`
? `btn-primary border-0! border border-transparent`
: vote == -1
? `bg-red-500 text-slate-50 dark:bg-red-400 dark:text-zinc-900`
: ''
@@ -23,7 +23,7 @@
import { t } from '$lib/app/i18n'
import { settings } from '$lib/app/settings.svelte'
import FormattedNumber from '$lib/ui/util/FormattedNumber.svelte'
import { buttonColor, toast } from 'mono-svelte'
import { toast } from 'mono-svelte'
import { ChevronDown, ChevronUp, Icon } from 'svelte-hero-icons/dist'
import { backOut } from 'svelte/easing'
import { fly } from 'svelte/transition'
@@ -93,14 +93,14 @@
<button
onclick={() => castVote(vote == targetNum ? 0 : targetNum)}
class={[
'flex items-center gap-0.5 transition-colors relative cursor-pointer h-full p-2',
'flex items-center gap-0.5 transition-colors relative cursor-pointer h-full p-2 first:border-r-0! first:rounded-l-[inherit] last:rounded-r-[inherit]',
'last:flex-row-reverse',
vote == targetNum
? shouldShowVoteColor(
vote,
target == 'upvote' ? 'upvotes' : 'downvotes',
)
: 'btn-tertiary',
: 'btn-secondary',
]}
aria-pressed={vote == targetNum}
aria-label={$t(
@@ -136,17 +136,13 @@
)}
<div
class={[
buttonColor.secondary,
'rounded-xl h-full font-medium flex relative hover:bg-transparent! overflow-hidden',
'rounded-xl h-full font-medium flex relative overflow-hidden',
voteRatio < 85 && settings.voteRatioBar && 'vote-ratio',
]}
aria-label={$t('aria.vote.group')}
style="--vote-ratio: {voteRatio}%;"
>
{@render voteButton(upvotes, 'upvote', vote)}
<div
class="h-full p-0! border-l border-slate-200 dark:border-zinc-800"
></div>
{#if site.data?.site_view.local_site.enable_downvotes ?? true}
{@render voteButton(downvotes, 'downvote', vote)}
{/if}
+4 -4
View File
@@ -60,14 +60,14 @@
border-right: 1px solid var(--color-slate-100);
&:first-of-type {
border-top-left-radius: var(--radius-3xl);
border-top-right-radius: var(--radius-3xl);
border-top-left-radius: var(--radius-2xl);
border-top-right-radius: var(--radius-2xl);
border-top: 1px solid var(--color-slate-100);
}
border-bottom: 1px solid var(--color-slate-100);
&:last-of-type {
border-bottom-left-radius: var(--radius-3xl);
border-bottom-right-radius: var(--radius-3xl);
border-bottom-left-radius: var(--radius-2xl);
border-bottom-right-radius: var(--radius-2xl);
}
&:hover {