neo4j-documentation / docs-ui

Mozilla Public License 2.0
4 stars 23 forks source link

Alter conditions for word-break text in tables #38

Closed recrwplay closed 3 years ago

recrwplay commented 3 years ago

The default Antora table word-break can cause parameter names to wrap, which does not look good.

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

Untitled

This can occur with reasonable column widths specified for a table.

I've spent some time trying to find an alternative, and this update changes the word-break from a condition applied to all table cells, and applies it to code and anchors in the cells instead. This prevents large codeblocks from exapnding the table, and covers the situation where we use a value or parameter of some kind as link text, but where it has not been formatted as code.

I don't know if this is the solution, but I'm yet to find anything better. A spot check hasn't shown me any times where it makes a table look obviously worse.