DARIAH-ERIC / lexicalresources

Data space of the DARIAH Lexical Resources Working Group
https://dariah-eric.github.io/lexicalresources/
BSD 2-Clause "Simplified" License
18 stars 24 forks source link

Use white-space: pre-wrap for code to avoid table rows overflow in the documentation #140

Closed daliboris closed 3 years ago

daliboris commented 3 years ago

In the generated documentation in some cases rows/cells of the table overflow width of the screen, as you can see here (Firefox 84.0.2 64bit): TEI-LEX-0_Overflow

The overflow is caused by <pre> elements (mostly <pre class=" language-xml">) containing example or schematron definition with long lines.

If you change CSS white-space property's value from pre to pre-wrap (see prism.css stylesheet, rule code[class *= "language-"], pre[class *= "language-"]), the result can look like this: TEI-LEX-0_WRAP

The same approach (pre-wrap value for white-space property) ia used in the TEI Guidlines (see https://tei-c.org/release/doc/tei-p5-doc/en/html/guidelines.css, rule pre,div.pre,div.pre_eg,pre.eg,div.eg on line 382). The documentation for this property can be found on MDN.

Using this value can result in some unwanted/strange rendering of examples, as you can see here (current look followed by proposed):

TEI-LEX-0_div vs. TEI-LEX-0_div_proposed

TEI-LEX-0_TEI att datable w3c vs. TEI-LEX-0_TEI att datable w3c-proposed

ttasovac commented 3 years ago

i don't like the way longer text in paragraphs breaks now but i don't think i can control that. also, to add insult to injury, now we get this:

Снимок экрана 2021-01-16 в 15 15 44

but, one thing at a time!

thanks for the suggestion, boris!