From c65238ea6959076341793cc1341aa2526f6e747a Mon Sep 17 00:00:00 2001 From: Miles Hinchliffe Date: Fri, 19 Sep 2025 14:07:47 +0100 Subject: [PATCH 1/2] Make card link bigger and move inline styling to style tag --- src/lib/components/ui/Card.svelte | 48 +++++++++++++------ src/wrappers/components/ui/CardWrapper.svelte | 4 +- 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/src/lib/components/ui/Card.svelte b/src/lib/components/ui/Card.svelte index 9e03292f..75c3f972 100644 --- a/src/lib/components/ui/Card.svelte +++ b/src/lib/components/ui/Card.svelte @@ -8,7 +8,7 @@ href = undefined, callToActionBackgroundColor = "white", bodyText = undefined, - bodyTextColor = undefined, + bodyTextColor = "#0B0C0C", bodyBackgroundColor = "#FBFCFD", bodyTopBorderColor = "#F4F8FB", bodyBottomBorderColor = "#c3d9e9", @@ -23,15 +23,13 @@ style="background-color: {callToActionBackgroundColor};" > {#if linkCard} - + {:else} {@render cardSnippet()} {/if}
- {bodyText} +

+ {bodyText} +

@@ -68,11 +68,29 @@ padding: 15px 20px; } - .body { + .link { + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; + } + + .link-heading { + color: var(--link-text-color); + } + + .body-div { + background-color: var(--body-bg-color); + border-bottom: 1px solid var(--body-bottom-border-color); + border-top: 1px solid var(--body-top-border-color); padding: 10px 20px 15px 20px; flex: 1; } + .body-text { + color: var(--body-text-color); + } + .govuk-heading-m { /* overwriting margin and line-height to make link centered vertically */ margin: 0; diff --git a/src/wrappers/components/ui/CardWrapper.svelte b/src/wrappers/components/ui/CardWrapper.svelte index a8c3449a..778f2db5 100644 --- a/src/wrappers/components/ui/CardWrapper.svelte +++ b/src/wrappers/components/ui/CardWrapper.svelte @@ -189,12 +189,12 @@ { name: "bodyText", category: "Input props", - value: `This is the text that gives more information about call to action in the card heading test.`, + value: `This is the text that gives more information about the call to action in the card heading.`, }, { name: "bodyTextColor", category: "Input props", - value: ``, + value: `#0B0C0C`, }, { name: "bodyBackgroundColor", From 3f407891e3e80a1568056082394014df2f443fe8 Mon Sep 17 00:00:00 2001 From: Miles Hinchliffe Date: Fri, 19 Sep 2025 15:24:02 +0100 Subject: [PATCH 2/2] Remove redundant import line --- src/lib/components/ui/Card.svelte | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib/components/ui/Card.svelte b/src/lib/components/ui/Card.svelte index 75c3f972..8bcb6c36 100644 --- a/src/lib/components/ui/Card.svelte +++ b/src/lib/components/ui/Card.svelte @@ -1,6 +1,4 @@