Skip to content

Commit

Permalink
Table block: Removes the word-break:break-all; from the table cells (
Browse files Browse the repository at this point in the history
…WordPress#16741)

* Fixes WordPress#16740. Removes the word-break:break-all; from the CSS for the Table cells.

* Added the overflow-wrap:break-word attribute which appears to be widely supported and works better than word-wrap:break-all.

* Changed to word-break:break-word as per @brentswisher's wonderful catch.

* Missed an overflow-wrap. Got it now.
  • Loading branch information
mapk authored and talldan committed Aug 6, 2019
1 parent c5d573a commit eba92cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion packages/block-library/src/table/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
// Ensure the table element is not full-width when aligned.
width: auto;
}

td,
th {
word-break: break-all;
word-break: break-word;
}
}

Expand Down
5 changes: 2 additions & 3 deletions packages/block-library/src/table/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

td,
th {
word-break: break-all;
word-break: break-word;
}
}

Expand All @@ -34,8 +34,7 @@

td,
th {
// Aligned tables shouldn't scroll horizontally so we need their contents to wrap.
word-break: break-all;
word-break: break-word;
}
}

Expand Down

0 comments on commit eba92cb

Please sign in to comment.