bouncepaw / mycorrhiza

🍄📑 Filesystem and git-based wiki engine for the independent web written in Go and using Mycomarkup as its primary markup language.
https://mycorrhiza.wiki
GNU Affero General Public License v3.0
300 stars 26 forks source link

Don't wrap text in codeblocks #183

Closed opsyne closed 1 year ago

opsyne commented 1 year ago

Currently, codeblocks in hyphae have wrapped text, due to the following CSS rules

article pre.codeblock {
  /* ... */
  white-space: pre-wrap;
  /* ... */
}

It's not difficult to change since I already use a script to add custom styles, but since most sites seem to use white-space: pre, I think pre would make a better default than pre-wrap.

I figured I'd propose the change before making a PR since it might've been done for a reason.

handlerug commented 1 year ago

I'd prefer to use the browser defaults. Let's see what @bouncepaw thinks about it.

bouncepaw commented 1 year ago

Text is to be wrapped, wontfix. It just makes zero sense to make readers scroll every line of text.

since most sites seem to use white-space: pre

That's where they are wrong.

Though it would be nice to have a CSS rule that changes this stuff somewhere in example hacks. Here, maybe?: https://mycorrhiza.lesarbr.es/hypha/contrib

handlerug commented 1 year ago

Though it would be nice to have a CSS rule that changes this stuff somewhere in example hacks. Here, maybe?: https://mycorrhiza.lesarbr.es/hypha/contrib

Not worth it