Table, Media & Text: replace deprecated word-break with overflow-wrap: anywhere - #82480
Table, Media & Text: replace deprecated word-break with overflow-wrap: anywhere#82480amitraj2203 wants to merge 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. To trigger a review, include ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🤖 PR meta 🤖📦 Bundle sizeSize Change: +39 B (0%) Total Size: 8 MB 📦 View Changed
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
As mentioned in #82426 (comment), I want to note that the original issue deliberately states:
That is because these changes need careful human testing. Pointing an AI agent to that issue and creating one PR with all changes, without proof (especially screenshots) that they were tested, implicitly shifts the vast majority of the workload to the reviewers, which is neither correct nor sustainable. With that said, please don't take this as a personal critique, but rather part of a wider message that I feel like we will have to leave around Gutenberg more frequently to many contributors. Specifically, regarding the code changes in this PR, the deprecated value is equivalent to both I can give a new round of review after the initial feedback was assessed / addressed, and after manual verification + screenshots have been posted. |
|
@ciampo, Thanks for the review. I've addressed the code feedback. On the scope. This isn't one PR with all the changes from #82293. It covers 4 declarations in two blocks only: "Table and Media & Text", and is opened as "Part of #82293", with the remaining declarations left for separate PRs. Before/after screenshots at 375px and 1280px were already included in the description. Below is the manual verification, re-done after the code change. Each case was checked on its own: fixed layout, all three alignments, an unaligned control that these rules deliberately do not target, and Media & Text on the front end at two viewports, under a theme that sets Front end — 1280px5. Table — default (control, these rules do not apply) Front end — 375pxThe page 5. Table — default (control, these rules do not apply) Screen.Recording.2026-09-07.at.12.16.01.AM.movThe recording shows the unaligned table scrolling inside its own figure. That is the pre-existing Inherited
|
Trunk (word-break: break-word) |
This PR (word-break: normal + overflow-wrap: anywhere) |
|
|---|---|---|
| 1. Fixed layout | ![]() |
![]() |
| 2. Align left | ![]() |
![]() |
| 3. Align center | ![]() |
![]() |
| 4. Align right | ![]() |
![]() |
| 5. Default (control) | ![]() |
![]() |
| 6. Media & Text | ![]() |
![]() |
Editor
5. Table — default (control, these rules do not apply)

I think this reinforces @ciampo's point a little. It is very easy to split this PR on a per-block basis to allow focused per-block testing and also make it straightforward to revert if issues do arise with a specific block post-merge. If you could split this PR @amitraj2203, I'd be happy to help out further with testing 🙏 |




























Part of #82293.
What?
Replace the deprecated
word-break: break-wordin the Table and Media & Text blocks withoverflow-wrap: anywhere, and remove the four Stylelint suppressions covering them.packages/block-library/src/table/style.scss— fixed-layout cells, and cells in aligned tablespackages/block-library/src/table/editor.scss— cells in aligned tables, editor sidepackages/block-library/src/media-text/style.scss— the content columnWhy?
word-break: break-wordis deprecated. Per CSS Text 3 it is defined asword-break: normalplusoverflow-wrap: anywhere— notoverflow-wrap: break-word.That distinction matters for these four declarations.
anywherelets soft wrap opportunities inside a long word count towards min-content sizing;break-worddoes not. All four sit on boxes sized intrinsically — aligned tables arewidth: auto, and the Media & Text content column is a grid track — sobreak-wordshifts the layout whileanywhereleaves it untouched.How?
Straight declaration swap, plus a short comment at the three intrinsic-sizing call sites noting why
anywhereis the correct replacement.Verified by measuring every affected box at 375px, 600px, 1024px and 1280px against both candidates.
overflow-wrap: anywherereproduced the current geometry exactly at every width.overflow-wrap: break-worddid not — it changes aligned table and Media & Text column widths at every width tested, and at 375px it widens aligned tables from 279px to 513px, giving the page horizontal scroll.Screenshots
Front end, on a page with a fixed-layout table, left- and center-aligned tables, and a Media & Text block, each holding a long unbroken URL. Before and after are pixel-identical at both widths — which is the point: this is a lint cleanup and the layout should not move.
Before / after — full-page at 375px and 1280px
word-break: break-wordoverflow-wrap: anywhereTesting Instructions
npm run lint:css— no violations in the changed files.Use of AI Tools
Claude code