From 63f72e610efd8d50d4b369eb384698a4163fe1f0 Mon Sep 17 00:00:00 2001 From: simonredfern Date: Sun, 4 Oct 2026 22:59:29 +0200 Subject: [PATCH 1/2] more standard web behaviour --- src/lib/components/Card.svelte | 65 +++++++++++----------------------- src/routes/+page.svelte | 28 +++++++-------- src/routes/design/+page.svelte | 3 +- 3 files changed, 35 insertions(+), 61 deletions(-) diff --git a/src/lib/components/Card.svelte b/src/lib/components/Card.svelte index b52d551..f76d30c 100644 --- a/src/lib/components/Card.svelte +++ b/src/lib/components/Card.svelte @@ -16,8 +16,9 @@ * * Two deliberate extensions to the upstream API, neither of which changes how * a plain Card renders: - * - `href` renders the card as an anchor, making the whole card one click - * target (upstream is always a
). + * - `href` makes the title a link (upstream has no link variant). Only the + * title is the link, not the whole card: text inside an anchor cannot be + * selected by dragging, and the subtitle and body must stay selectable. * - `leading` is a snippet slot before the titles, for an icon. */ import type { Snippet } from 'svelte'; @@ -62,7 +63,8 @@
{#if title} - {title}{#if href}{title}{:else}{title}{/if} {/if} {#if subtitle} @@ -79,24 +81,13 @@ {/if} {/snippet} -{#if href} - - {@render inner()} - -{:else} -
- {@render inner()} -
-{/if} +
+ {@render inner()} +