Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent list items from overflowing Markdown content #1736

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tough-glasses-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/starlight': patch
---

Prevent list items from overflowing Markdown content
4 changes: 4 additions & 0 deletions packages/starlight/style/markdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 *)) {
Expand Down
1 change: 1 addition & 0 deletions packages/starlight/user-components/Tabs.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree that this makes sense given how overflow-wrap is inherited 👍

}
.tab [role='tab'][aria-selected='true'] {
color: var(--sl-color-white);
Expand Down
Loading