From cfa94a346ef10804b90db28d217be175e1c1d5ed Mon Sep 17 00:00:00 2001 From: Julien Déramond Date: Thu, 16 May 2024 22:52:04 +0200 Subject: fix: prevent list items from overflowing Markdown content (#1736) Co-authored-by: HiDeoo <494699+HiDeoo@users.noreply.github.com> Co-authored-by: Chris Swithinbank <357379+delucis@users.noreply.github.com>--- .changeset/tough-glasses-tan.md | 5 +++++ packages/starlight/style/markdown.css | 4 ++++ packages/starlight/user-components/Tabs.astro | 1 + 3 files changed, 10 insertions(+) create mode 100644 .changeset/tough-glasses-tan.md diff --git a/.changeset/tough-glasses-tan.md b/.changeset/tough-glasses-tan.md new file mode 100644 index 00000000..4d4e7e9f --- /dev/null +++ b/.changeset/tough-glasses-tan.md @@ -0,0 +1,5 @@ +--- +'@astrojs/starlight': patch +--- + +Prevent list items from overflowing Markdown content diff --git a/packages/starlight/style/markdown.css b/packages/starlight/style/markdown.css index d0e2248e..1f065ff9 100644 --- a/packages/starlight/style/markdown.css +++ b/packages/starlight/style/markdown.css @@ -18,6 +18,10 @@ margin-top: 0.25rem; } +.sl-markdown-content li:not(:where(.not-content *)) { + overflow-wrap: anywhere; +} + .sl-markdown-content li > :last-child:not(li, ul, ol):not(a, strong, em, del, span, input, :where(.not-content *)) { diff --git a/packages/starlight/user-components/Tabs.astro b/packages/starlight/user-components/Tabs.astro index f93475c1..806941bc 100644 --- a/packages/starlight/user-components/Tabs.astro +++ b/packages/starlight/user-components/Tabs.astro @@ -65,6 +65,7 @@ const { html, panels } = processPanels(panelHtml); border-bottom: 2px solid var(--sl-color-gray-5); color: var(--sl-color-gray-3); outline-offset: var(--sl-outline-offset-inside); + overflow-wrap: initial; } .tab [role='tab'][aria-selected='true'] { color: var(--sl-color-white); -- cgit