Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "monospace" as a fallback font for pre and code #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

benblank
Copy link

@benblank benblank commented Jul 3, 2022

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:

Before: pre section using variable-width font

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:

After: pre section using monospace font

@welcome
Copy link

welcome bot commented Jul 3, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant