makew0rld / amfora

A fancy terminal browser for the Gemini protocol.
GNU General Public License v3.0
1.16k stars 67 forks source link

Optional background color for preformatted text #279

Open makew0rld opened 2 years ago

makew0rld commented 2 years ago

Sometimes it's hard to distinguish between preformatted text and regular text on Gemini. Some themes fix this by making preformatted text a different color, but not all themes do that, especially the default theme. And when you throw #252 into the mix it gets more confusing. A good way to solve this would be an optional background color for preformatted text. It would just be another theme key, but if unset or set to "default" it would use the same value as the bg key.

makew0rld commented 2 years ago

Added to the v1.10.0 milestone because #252 is in there as well.

makew0rld commented 2 years ago

Ideally the background color would have some sort of padding, so that it doesn't begin right on the edge of the letter, but one space above and to left for the first letter, etc. Like this area for GitHub code blocks that I've highlighted:

image

Doing this vertically is a super easy change. Doing it horizontally would probably require a lot of rendering or layout refactoring, so it depends on how bad it looks without it I guess.