From a774704b9ffa1911551779faeb0d4c16821f3b93 Mon Sep 17 00:00:00 2001 From: Matthew Justice <72817096+JusticeMatthew@users.noreply.github.com> Date: Fri, 17 Oct 2025 18:05:12 -0400 Subject: [PATCH 1/3] Change overflow-wrap property to break-word Implementing the changes discussed in https://github.com/withastro/starlight/issues/1321 Closes #1321 --- packages/starlight/style/reset.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { From a603b5ca72f75fbd62e74542726631d13afa8022 Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Sat, 18 Oct 2025 11:16:43 +0200 Subject: [PATCH 2/3] Add changeset --- .changeset/blue-trees-shave.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .changeset/blue-trees-shave.md diff --git a/.changeset/blue-trees-shave.md b/.changeset/blue-trees-shave.md new file mode 100644 index 00000000000..c7f9e0a0aae --- /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 to your site: + +```css +p, h1, h2, h3, h4, h5, h6, code { + overflow-wrap: anywhere; +} +``` From 4244139ad9ec91b99476fa35517481eb06acaf38 Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Wed, 22 Oct 2025 12:40:27 +0200 Subject: [PATCH 3/3] Add docs link to changeset Co-authored-by: Felix Schneider <99918022+trueberryless@users.noreply.github.com> --- .changeset/blue-trees-shave.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/blue-trees-shave.md b/.changeset/blue-trees-shave.md index c7f9e0a0aae..a7b41cad2f0 100644 --- a/.changeset/blue-trees-shave.md +++ b/.changeset/blue-trees-shave.md @@ -6,7 +6,7 @@ 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 to your site: +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 {