Skip to content

Commit

Permalink
force words to break that don't fit within available space
Browse files Browse the repository at this point in the history
* word-wrap: break-word globally
* word-break: break-word in table cells
  • Loading branch information
mojavelinux committed Apr 29, 2020
1 parent d81105a commit cf64d19
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/css/body.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.body {
word-wrap: break-word; /* aka overflow-wrap; used when hyphens are disabled or don't do the trick */
}

@media screen and (min-width: 1024px) {
.body {
display: flex;
Expand Down
5 changes: 5 additions & 0 deletions src/css/doc.css
Original file line number Diff line number Diff line change
Expand Up @@ -639,3 +639,8 @@
.doc .icon i::after {
hyphens: none;
}

.doc th.tableblock,
.doc td.tableblock {
word-break: break-word; /* overflow-wrap for table cells; gives space higher precedence than hyphen opportunity */
}

0 comments on commit cf64d19

Please sign in to comment.