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

CSS: code-blocks are not displayed in monospace #581

Open
westurner opened this issue Apr 9, 2020 · 3 comments
Open

CSS: code-blocks are not displayed in monospace #581

westurner opened this issue Apr 9, 2020 · 3 comments

Comments

@westurner
Copy link

@westurner westurner commented Apr 9, 2020

The code blocks in the Python Devguide are not in monospace? It's borking the ASCII art, and possibly other code blocks?

Example::

  • RTD w/ Devguide Sphinx theme:

https://devguide.python.org/garbage_collector/#memory-layout-and-object-structure

  • GH rst2html:

https://github.com/python/devguide/blob/master/garbage_collector.rst#memory-layout-and-object-structure

  • GH raw:

https://raw.githubusercontent.com/python/devguide/master/garbage_collector.rst

@westurner
Copy link
Author

@westurner westurner commented Apr 11, 2020

RTD theme:

  • Chrome Android: not monospace
  • FF Android: monospace

GH rst2html:

  • *: monospace
@hugovk
Copy link
Contributor

@hugovk hugovk commented Sep 28, 2020

Can reproduce:

  • Chrome macOS: monospace
  • Chrome Android: not monospace

image

It gets the font from pydoctheme.css and looks like it's falling back to sans-serif:

tt, code, pre {
    font-family: monospace, sans-serif;
    font-size: 96.5%;
}

However, monospace works on this test page:

image

https://www.zipcon.net/~swhite/docs/computers/browsers/fonttest.html

Could it be the non-whole number font-size: 96.5%;?

@hugovk
Copy link
Contributor

@hugovk hugovk commented Sep 28, 2020

And this also happens at https://pip.pypa.io, so this is likely a https://github.com/python/python-docs-theme bug.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.