-
Notifications
You must be signed in to change notification settings - Fork 299
Improve site legibility #263
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
Conversation
This patch removes unnecessary letter-spacing and line-height settings, as well as the forced Arial/Helvetica font override, an instead uses the user's chosen font and the font's settings for letter-spacing and line-height. It also removes the global override for initial page font size, so that the user's font size settings are preserved. The blockquote styles are also update so that the quoted text is formatted similarly to the surrounding text (no italics, and no larger font size), and with a blacker grey to make the text more legible.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Can you add screenshots of before and after this change please? :) |
Makes it easier to read indeed. 👍 for me but not sure I'm the one who should give the go for this PR so let's wait for someone else. |
👍 Yeah, I tried to figure out who's been touching style files lately, and it seems like changes to the styles are just really rare. It mostly seems to be @huonw back in 2015, with nearly no changes since, so I don't know that this is really anyone's responsibility at the moment.. |
Well, let's give them a few days and if no one comes around then I'll just r+ it. Ping me in a few days. |
ping @GuillaumeGomez @aturon |
bump @GuillaumeGomez @aturon again? |
Well I suppose it's good to go then (a few days became a few weeks after all). Thanks! @bors: r+ |
Oups hold on, I think bors doesn't run here. We need someone with merge rights. @aturon: Can you merge please? :) |
gentle nudge @aturon |
Sorry about taking so long here; I like it. Thanks! |
This patch is similar in spirit to rust-lang/blog.rust-lang.org#263, though it's also less invasive; it removes the specific font overrides in style.css so that the browser will use the user's configured fonts. The net result of the change is that the page will look less "uniform" across different browsers, OSes, and devices, but the overall aesthetic should be preserved. It also means that user preferences are respected, and that legibility is improved for users with particular font needs, or on platforms that sometimes gets confused about how to render fonts nicely (ehrm, Linux).
This patch is similar in spirit to rust-lang/blog.rust-lang.org#263 and onur/docs.rs#240; it removes the specific font overrides in rustdoc.css so that the browser will use the user's configured fonts. This reduces the weight of all rustdoc pages (yay for mobile!) while also letting users use whatever fonts they prefer. The net result of the change is that the page will look less "uniform" across different browsers, OSes, and devices, but the overall aesthetic should be preserved. It also means that user preferences are respected, and that legibility is improved for users with particular font needs, or on platforms that sometimes gets confused about how to render fonts nicely (ehrm, Linux).
This may be a little controversial, but I figured I'd open a PR to get a conversation started. I realize that this PR may not be merged as-is :)
The current blog.rust-lang.org styles override most user settings (like font size and page font), and also overrides font properties like letter-spacing and line-height in a number of places which makes many fonts harder to read.
This patch removes unnecessary letter-spacing and line-height settings, as well as the forced Arial/Helvetica font override, an instead uses the user's chosen font and the font's settings for letter-spacing and line-height. It also removes the global override for initial page font size, so that the user's font size settings are preserved.
The blockquote styles are also update so that the quoted text is formatted similarly to the surrounding text (no italics, and no larger font size), and with a blacker grey to make the text more legible.
The net result of the change is that the page will look less "uniform" across different browsers, OSes, and devices, but the overall aesthetic should be preserved, user preferences are respected, and legibility should generally be improved.
To take this further, all
font-size
style settings that use thepx
unit should also be changed to a relative unit like%
orem
so that they scale proportionally for users that have increased or decreased their browser default font size, but I'll leave that for another day.