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

Improve code font sizing #131

Merged
merged 2 commits into from
Oct 21, 2019
Merged

Improve code font sizing #131

merged 2 commits into from
Oct 21, 2019

Conversation

NickColley
Copy link
Contributor

@NickColley NickColley commented Oct 18, 2019

I'm not aware of a way to solve this consistently cross browser with root relative font sizing.

I'm following this hack which tricks browsers into doing the right thing: http://code.iamkate.com/html-and-css/fixing-browsers-broken-monospace-font-handling/

Screenshots

Before, code blocks font size is too large

image

After, code blocks font size is consistent

image

I have tested this in Firefox, Safari, Internet Explorer, Edge and Chrome

Makes it easier to test different code blocks
Browser vendors have an odd behaviour and this is hacky but resolves our
issues, the alternatives are not clear since different browsers handle
relative units on pre, code differently.
@NickColley NickColley merged commit 3bba809 into master Oct 21, 2019
@NickColley NickColley deleted the improve-code-font-sizing branch October 21, 2019 09:16
@NickColley NickColley mentioned this pull request Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants