top | item 37973508

(no title)

_kblcuk_ | 2 years ago

Because it's not a text organised into sections, paragraphs and whatnot with html, it's just a plain text file rendered into one big paragraph with whitespace set to `pre` ¯\_(ツ)_/¯.

discuss

order

madeofpalk|2 years ago

`white-space: pre-wrap` is the solution to this. It's pre, but with wrapping when it's needed :)

montroser|2 years ago

It's arguable whether this is better or worse, because now you'll have the text wrapping where needed _but also_ again where it would have on a wider viewport, even though it already wrapped. So on mobile you'll have a full line, then half a line, then a full line, then half a line, and so on, wrapping alternatingly at the natural edge of the viewport, and again at the original line end terminated by a line break.

_kblcuk_|2 years ago

cc @j3s (I wonder if this even works here), here's your line breaks fix :)

(assuming that since HN is mentioned in git repo [0] for the site, the author does read this occasionally)

[0] https://git.j3s.sh/j3s.sh