From ac39e7d016fa3ec2bf74dabc0cd08d9f018f4540 Mon Sep 17 00:00:00 2001 From: Amit Raj Date: Sat, 5 Sep 2026 12:01:56 +0530 Subject: [PATCH 1/5] Table, Media & Text: replace deprecated word-break with overflow-wrap: anywhere --- packages/block-library/src/media-text/style.scss | 5 +++-- packages/block-library/src/table/editor.scss | 5 +++-- packages/block-library/src/table/style.scss | 8 ++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/block-library/src/media-text/style.scss b/packages/block-library/src/media-text/style.scss index 7fa5b080762bf0..0d60449ad42bc2 100644 --- a/packages/block-library/src/media-text/style.scss +++ b/packages/block-library/src/media-text/style.scss @@ -53,8 +53,9 @@ grid-row: 1; /*rtl:end:ignore*/ padding: 0 8% 0 8%; - // stylelint-disable-next-line declaration-property-value-keyword-no-deprecated -- Pending review of overflow-wrap alternative. - word-break: break-word; + // `anywhere` rather than `break-word`, so that break points inside long words + // still count towards min-content and the grid track sizing. + overflow-wrap: anywhere; } .wp-block-media-text.has-media-on-the-right > .wp-block-media-text__media { diff --git a/packages/block-library/src/table/editor.scss b/packages/block-library/src/table/editor.scss index 6f7fb022934b0b..b2c5e31d284746 100644 --- a/packages/block-library/src/table/editor.scss +++ b/packages/block-library/src/table/editor.scss @@ -15,8 +15,9 @@ td, th { - // stylelint-disable-next-line declaration-property-value-keyword-no-deprecated -- Pending review of overflow-wrap alternative. - word-break: break-word; + // `anywhere` rather than `break-word`, so that break points inside long + // words still count towards min-content and the shrink-to-fit width. + overflow-wrap: anywhere; } } diff --git a/packages/block-library/src/table/style.scss b/packages/block-library/src/table/style.scss index 6c88a2a4944b15..8411645115e669 100644 --- a/packages/block-library/src/table/style.scss +++ b/packages/block-library/src/table/style.scss @@ -36,8 +36,7 @@ td, th { - // stylelint-disable-next-line declaration-property-value-keyword-no-deprecated -- Pending review of overflow-wrap alternative. - word-break: break-word; + overflow-wrap: anywhere; } } @@ -54,8 +53,9 @@ td, th { - // stylelint-disable-next-line declaration-property-value-keyword-no-deprecated -- Pending review of overflow-wrap alternative. - word-break: break-word; + // `anywhere` rather than `break-word`, so that break points inside long + // words still count towards min-content and the shrink-to-fit width. + overflow-wrap: anywhere; } } From c78b2bf2d8dec1e988068a9fc7be90b484a20cca Mon Sep 17 00:00:00 2001 From: Amit Raj Date: Sat, 5 Sep 2026 12:15:07 +0530 Subject: [PATCH 2/5] Remove explanatory comments from the overflow-wrap declarations --- packages/block-library/src/media-text/style.scss | 2 -- packages/block-library/src/table/editor.scss | 2 -- packages/block-library/src/table/style.scss | 2 -- 3 files changed, 6 deletions(-) diff --git a/packages/block-library/src/media-text/style.scss b/packages/block-library/src/media-text/style.scss index 0d60449ad42bc2..c114c4ae21811c 100644 --- a/packages/block-library/src/media-text/style.scss +++ b/packages/block-library/src/media-text/style.scss @@ -53,8 +53,6 @@ grid-row: 1; /*rtl:end:ignore*/ padding: 0 8% 0 8%; - // `anywhere` rather than `break-word`, so that break points inside long words - // still count towards min-content and the grid track sizing. overflow-wrap: anywhere; } diff --git a/packages/block-library/src/table/editor.scss b/packages/block-library/src/table/editor.scss index b2c5e31d284746..2ebb9c3ae353e2 100644 --- a/packages/block-library/src/table/editor.scss +++ b/packages/block-library/src/table/editor.scss @@ -15,8 +15,6 @@ td, th { - // `anywhere` rather than `break-word`, so that break points inside long - // words still count towards min-content and the shrink-to-fit width. overflow-wrap: anywhere; } } diff --git a/packages/block-library/src/table/style.scss b/packages/block-library/src/table/style.scss index 8411645115e669..31dad766e966d1 100644 --- a/packages/block-library/src/table/style.scss +++ b/packages/block-library/src/table/style.scss @@ -53,8 +53,6 @@ td, th { - // `anywhere` rather than `break-word`, so that break points inside long - // words still count towards min-content and the shrink-to-fit width. overflow-wrap: anywhere; } } From b72bcf2e085207d069cd8847fe6fbd92af10c9d8 Mon Sep 17 00:00:00 2001 From: Amit Raj Date: Mon, 7 Sep 2026 00:05:29 +0530 Subject: [PATCH 3/5] Set word-break: normal alongside overflow-wrap: anywhere --- packages/block-library/src/media-text/style.scss | 1 + packages/block-library/src/table/editor.scss | 1 + packages/block-library/src/table/style.scss | 2 ++ 3 files changed, 4 insertions(+) diff --git a/packages/block-library/src/media-text/style.scss b/packages/block-library/src/media-text/style.scss index c114c4ae21811c..9f766de995d7be 100644 --- a/packages/block-library/src/media-text/style.scss +++ b/packages/block-library/src/media-text/style.scss @@ -53,6 +53,7 @@ grid-row: 1; /*rtl:end:ignore*/ padding: 0 8% 0 8%; + word-break: normal; overflow-wrap: anywhere; } diff --git a/packages/block-library/src/table/editor.scss b/packages/block-library/src/table/editor.scss index 2ebb9c3ae353e2..764b09a7c082ac 100644 --- a/packages/block-library/src/table/editor.scss +++ b/packages/block-library/src/table/editor.scss @@ -15,6 +15,7 @@ td, th { + word-break: normal; overflow-wrap: anywhere; } } diff --git a/packages/block-library/src/table/style.scss b/packages/block-library/src/table/style.scss index 31dad766e966d1..ad1664dfd95b74 100644 --- a/packages/block-library/src/table/style.scss +++ b/packages/block-library/src/table/style.scss @@ -36,6 +36,7 @@ td, th { + word-break: normal; overflow-wrap: anywhere; } } @@ -53,6 +54,7 @@ td, th { + word-break: normal; overflow-wrap: anywhere; } } From ded4dde71a88b04450d6518915188ccb274566c3 Mon Sep 17 00:00:00 2001 From: Amit Raj Date: Tue, 8 Sep 2026 05:40:36 +0530 Subject: [PATCH 4/5] Move Media & Text change to its own PR --- packages/block-library/src/media-text/style.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/media-text/style.scss b/packages/block-library/src/media-text/style.scss index 9f766de995d7be..7fa5b080762bf0 100644 --- a/packages/block-library/src/media-text/style.scss +++ b/packages/block-library/src/media-text/style.scss @@ -53,8 +53,8 @@ grid-row: 1; /*rtl:end:ignore*/ padding: 0 8% 0 8%; - word-break: normal; - overflow-wrap: anywhere; + // stylelint-disable-next-line declaration-property-value-keyword-no-deprecated -- Pending review of overflow-wrap alternative. + word-break: break-word; } .wp-block-media-text.has-media-on-the-right > .wp-block-media-text__media { From 2ac11795be6c70a7821e56c571e66e76cbb599d2 Mon Sep 17 00:00:00 2001 From: Shail Mehta Date: Wed, 23 Sep 2026 20:05:18 +0530 Subject: [PATCH 5/5] Apply Feedback Changes --- packages/block-library/src/table/editor.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/block-library/src/table/editor.scss b/packages/block-library/src/table/editor.scss index 764b09a7c082ac..0555b835e42130 100644 --- a/packages/block-library/src/table/editor.scss +++ b/packages/block-library/src/table/editor.scss @@ -32,6 +32,12 @@ th { border: $border-width solid; padding: 0.5em; + + // The UA stylesheet sets `overflow-wrap: break-word` on editable + // elements, which would otherwise win over the cell's value. + [contenteditable="true"] { + overflow-wrap: inherit; + } } td.is-selected,