CSS: code-blocks are not displayed in monospace
westurner opened this issue · 5 comments
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:
- GH raw:
https://raw.githubusercontent.com/python/devguide/master/garbage_collector.rst
RTD theme:
- Chrome Android: not monospace
- FF Android: monospace
GH rst2html:
- *: monospace
Can reproduce:
- Chrome macOS: monospace
- Chrome Android: not monospace
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:
https://www.zipcon.net/~swhite/docs/computers/browsers/fonttest.html
Could it be the non-whole number font-size: 96.5%;
?
And this also happens at https://pip.pypa.io, so this is likely a https://github.com/python/python-docs-theme bug.
For the record, all the code-blocks from the devguide appears in monospace on my Chrome Android, as of August 2021. Should this be closed?
Looks good