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

Opt out of monospace font-size quirk #93

Open
danburzo opened this issue Feb 16, 2023 · 0 comments
Open

Opt out of monospace font-size quirk #93

danburzo opened this issue Feb 16, 2023 · 0 comments

Comments

@danburzo
Copy link

danburzo commented Feb 16, 2023

With default browser styles, markup like this:

<p>The results are saved to <code style='font-size: 1em'>localStorage</code>.</p>

Will produce a font size of 16px for the paragraph (depending on user preference) and a reduced size for <code> (13px). Normalize.css has solved this with:

pre, code, kbd, samp {
  font-family: monospace, monospace;
}

...which is functionally equivalent but bypasses the quirk (which seems to be contained to a computed value of monospace), without inventing any bogus font name that may produce a collision in thee future. I think the solution is a good candidate for cssremedy.

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

No branches or pull requests

1 participant