From 96ed67ba19eb34bb81813620373f314c6ec8b669 Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Fri, 19 Jan 2024 13:48:38 +0100 Subject: [PATCH 1/3] Restore original tighter line-height on `` titles --- packages/starlight/user-components/LinkCard.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/starlight/user-components/LinkCard.astro b/packages/starlight/user-components/LinkCard.astro index aecbe572118..4c5414d0494 100644 --- a/packages/starlight/user-components/LinkCard.astro +++ b/packages/starlight/user-components/LinkCard.astro @@ -34,6 +34,7 @@ const { title, description, ...attributes } = Astro.props; a { text-decoration: none; + line-height: var(--sl-line-height-headings); } /* a11y fix for https://github.com/withastro/starlight/issues/487 */ @@ -52,7 +53,6 @@ const { title, description, ...attributes } = Astro.props; color: var(--sl-color-white); font-weight: 600; font-size: var(--sl-text-lg); - line-height: var(--sl-line-height-headings); } .description { From e65d1d2e053e4a66a3c957c3d5ce4685f74c9d62 Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Fri, 19 Jan 2024 14:08:41 +0100 Subject: [PATCH 2/3] Refactor `` to have class name to hook into --- packages/starlight/user-components/LinkCard.astro | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/starlight/user-components/LinkCard.astro b/packages/starlight/user-components/LinkCard.astro index 4c5414d0494..8cf6fbd90fd 100644 --- a/packages/starlight/user-components/LinkCard.astro +++ b/packages/starlight/user-components/LinkCard.astro @@ -10,7 +10,7 @@ interface Props extends Omit, 'title'> { const { title, description, ...attributes } = Astro.props; --- -
+ From ca40ecdac0c95716d0f258c5bc9fe7c66725f07d Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Fri, 19 Jan 2024 14:12:59 +0100 Subject: [PATCH 3/3] Add changeset --- .changeset/eighty-cats-float.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .changeset/eighty-cats-float.md diff --git a/.changeset/eighty-cats-float.md b/.changeset/eighty-cats-float.md new file mode 100644 index 00000000000..3a94a9d6353 --- /dev/null +++ b/.changeset/eighty-cats-float.md @@ -0,0 +1,13 @@ +--- +'@astrojs/starlight': minor +--- + +Tightens `line-height` on `` titles to fix regression from original design + +If you want to preserve the previous `line-height`, you can add the following custom CSS to your site: + +```css +.sl-link-card a { + line-height: 1.6; +} +```