modernist
modernist copied to clipboard
Add "monospace" as a fallback font for pre and code
Currently, if a client doesn't have any of the fonts listed for code, pre
available on their system, it uses the browser's default font, which is typically a variable-width font. Unfortunately, this looks terrible.
For example, here is a relevant portion of the demo page viewed under Chrome 103 on my laptop running Lubuntu 22.04, which has none of the specified fonts:
This PR adds monospace
as a final option, which will at least allow browsers to select an available monospace font for those elements. Here is the same section, on the same browser and laptop, after the change:
Welcome! Congrats on your first pull request to the Modernist theme. If you haven't already, please be sure to check out the contributing guidelines.