Example table cell contents:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris feugiat orci sed diam ultricies, et cursus purus mollis. Fusce nec dui ac lectus hendrerit convallis et at purus.
Other table cell content is names of API elements (so long strings of letters)
Example string:
loreumIpsumDolorSit.AmetConsectetur
ISSUE 1
We want the long strings to wrap instead of bleeding over to the next cell, so we use the following CSS rules:
Code: Select all
*[class~="topic/table"] {
table-layout: auto;
border: none;
width: 100%;
overflow-wrap: break-word;
-oxy-hyphenation-character: " ";
ISSUE 2
However, this also causes normal words to break in weird places.
So for example,
"position"
would break into
"positio
n"
We wanted to make this so that if the word has a minimum number of characters after the hyphen, it'll move the entire word to the next line instead of breaking it.
We used the following code:
Code: Select all
*[class~="topic/table"] {
table-layout: auto;
border: none;
width: 100%;
overflow-wrap: break-word;
hyphens: auto;
-oxy-hyphenation-character: " "; /* removes hyphens in line-broken words */
-oxy-hyphenation-push-character-count: "3" !important;
-oxy-hyphenation-remain-character-count: "10" !important;
}
How do we have both active for tables?