Skip to content

Commit

Permalink
Improve word breaking in doc table
Browse files Browse the repository at this point in the history
To maintain similar word breaking without adding <wbr> tags I've added
some css styles that do essentially the same job. word-break: break-word
gives us the best formatting but it's not a part of the standard yet
(see link below) so I provided an almost-as-good fallback with
break-all.

https://bugs.chromium.org/p/chromium/issues/detail?id=492202#c21
  • Loading branch information
Bargs committed Nov 10, 2016
1 parent fc443bb commit ac38524
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/ui/public/doc_table/doc_table.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ doc-table {

.discover-table-datafield {
white-space: pre-wrap;

// break-word is what we really want but it hasn't been added to the standard and adopted by all browsers yet,
// so we provide break-all as a fallback
word-break: break-all;
word-break: break-word;
}

.discover-table-sourcefield {
word-break: break-all;
word-break: break-word;
}

.loading {
Expand Down

0 comments on commit ac38524

Please sign in to comment.