maghoff / sausagewiki

A simple, self-contained Wiki engine
GNU General Public License v3.0
99 stars 5 forks source link

UI: Reduced line-height for code blocks (pre tags) #65

Closed paulcmal closed 6 years ago

paulcmal commented 6 years ago

CSS line-height is way too big for code blocks out of-the-box. So when you have some empty lines in a code block it becomes mostly unreadable. I feel like 22px is a better default given the 18px default font-size.

You can see this change running in production here :)

maghoff commented 6 years ago

The problem is deeper than this: code blocks look very different across different operating systems because the fonts offered on each system vary greatly. I attempted to combat this by selecting the font size by x-height, but this is apparently only available in Firefox. I suspect that the way out of this mess is to use a web font, but I am wary of the extra weight. Hmm.

paulcmal commented 6 years ago

this is apparently only available in Firefox

I'm running Firefox and sausagewiki code blocks look really unfit to long scripts/docs to me (because of a crazy line spacing). See screenshot : screenshot

I am wary of the extra weight

Indeed, adding a webfont for everything is not a solution. So what can we do about this problem? (other than the small change i proposed which already made my life better when writing docs :))

maghoff commented 6 years ago

This looks fine (but not great) to me. Long scripts isn't really a use case for Sausagewiki.