diff options
author | Julien Déramond | 2024-05-16 22:52:04 +0200 |
---|---|---|
committer | GitHub | 2024-05-16 22:52:04 +0200 |
commit | cfa94a346ef10804b90db28d217be175e1c1d5ed (patch) | |
tree | 864889770674782604219cd08f5751e228eb6deb | |
parent | ca9c4ce53774433160bba7d2b6c383e34b99585b (diff) | |
download | IT.starlight-cfa94a346ef10804b90db28d217be175e1c1d5ed.tar.gz IT.starlight-cfa94a346ef10804b90db28d217be175e1c1d5ed.tar.bz2 IT.starlight-cfa94a346ef10804b90db28d217be175e1c1d5ed.zip |
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>
-rw-r--r-- | .changeset/tough-glasses-tan.md | 5 | ||||
-rw-r--r-- | packages/starlight/style/markdown.css | 4 | ||||
-rw-r--r-- | packages/starlight/user-components/Tabs.astro | 1 |
3 files changed, 10 insertions, 0 deletions
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); |