Infra: improve text readability and webpage performance#3132
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Space is important for the readability of any kind of text.
Right now the PEP webpages use a Google font with a lot of custom CSS to pull the text in tighter and with less whitespace.
I find the font, small size and tight spacing hard to read (and my eyes aren't getting any younger!). Using default fonts and spacing feels more readable and loads faster. The Google font causes an annoying initial layout shift after it's loaded and the page is re-rendered.
Readability was brought up when we overhauled the PEPs infra as part of PEP 676. But as the other improvements and benefits of migration were so big, it made sense to press ahead without delaying to discuss this further.
One year on, the overhauled infra has been working really well. Let's now improve the readability :)
Original comments
Some of the comments from the original discussion:
This PR
This PR uses a default "system font stack", and removes a lot of the custom CSS to use default CSS spacing. Let's compare:
Original
PR
Benefits according to https://systemfontstack.com:
Many sites use a system font stack: GitHub, Stack Overflow, Booking.com, and Weather.com, Bootstrap, Medium, Ghost, PubMed, and the WordPress dashboard. As do the Furo (used on the devguide) and pydata-sphinx-theme themes. See more on the history and rationale.
I looked at sites such as Mozilla's MDN Web Docs (for example: https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching) to compare CSS. Their site is technical writing which I find clearly laid out, with space to breathe. They use a lot of default CSS values.
I've been using this preview build to read recent PEPs and found it much clearer.
In numbers
Running some numbers on Google's Lighthouse tool (ignore the SEO drop on the PR, that's because RtD rightly hides preview builds via robots.txt) shows better performance with the PR:
Note:
And: