diff --git a/.changeset/blue-trees-shave.md b/.changeset/blue-trees-shave.md new file mode 100644 index 00000000000..a7b41cad2f0 --- /dev/null +++ b/.changeset/blue-trees-shave.md @@ -0,0 +1,15 @@ +--- +"@astrojs/starlight": minor +--- + +Changes text overflow styling in Markdown content + +⚠️ **Potentially breaking change:** This release switches the [`overflow-wrap`](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap) CSS style for common elements to `break-word`. In most cases, there should be little visual impact, but this change can impact how layouts with implicit sizing (such as tables) look, improving legibility in how words wrap. + +If you want to preserve the previous styling, you can add the following [custom CSS](https://starlight.astro.build/guides/css-and-tailwind/#custom-css-styles) to your site: + +```css +p, h1, h2, h3, h4, h5, h6, code { + overflow-wrap: anywhere; +} +``` diff --git a/packages/starlight/style/reset.css b/packages/starlight/style/reset.css index f2855a468e7..64a655d446d 100644 --- a/packages/starlight/style/reset.css +++ b/packages/starlight/style/reset.css @@ -41,7 +41,7 @@ h5, h6, code { - overflow-wrap: anywhere; + overflow-wrap: break-word; } code {