diff --git a/packages/block-library/src/table/editor.scss b/packages/block-library/src/table/editor.scss index 6f7fb022934b0b..0555b835e42130 100644 --- a/packages/block-library/src/table/editor.scss +++ b/packages/block-library/src/table/editor.scss @@ -15,8 +15,8 @@ td, th { - // stylelint-disable-next-line declaration-property-value-keyword-no-deprecated -- Pending review of overflow-wrap alternative. - word-break: break-word; + word-break: normal; + overflow-wrap: anywhere; } } @@ -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, diff --git a/packages/block-library/src/table/style.scss b/packages/block-library/src/table/style.scss index 6c88a2a4944b15..ad1664dfd95b74 100644 --- a/packages/block-library/src/table/style.scss +++ b/packages/block-library/src/table/style.scss @@ -36,8 +36,8 @@ td, th { - // stylelint-disable-next-line declaration-property-value-keyword-no-deprecated -- Pending review of overflow-wrap alternative. - word-break: break-word; + word-break: normal; + overflow-wrap: anywhere; } } @@ -54,8 +54,8 @@ td, th { - // stylelint-disable-next-line declaration-property-value-keyword-no-deprecated -- Pending review of overflow-wrap alternative. - word-break: break-word; + word-break: normal; + overflow-wrap: anywhere; } }