Description
Clicking the Source
link (e.g. https://docs.rs/crate/uom/0.21.0/source/src/storage_types.rs, line 7) in the docs.rs header goes to a page where the source view only shows 95 characters. The default rustfmt
maximum line width is 100 which means horizontal scrolling is sometimes necessary. Note that clicking a src
link (e.g. https://docs.rs/uom/0.21.0/src/uom/storage_types.rs.html#7) within the documentation goes to a different view with a collapsed sidebar that shows over 100 characters.
After some experimentation I found that in Firefox/Chrome/Edge changing the font-size
from the default of 16px
inherited from body
to 15px
allows for 101 characters to be seen. There didn't seem to be a great spot in the scss file to make the change so I have not submitted a PR, but am willing to do so with a bit of guidance:
- Is this a desired change?
- Would using an
rem
orem
font be preferred? I only used15px
in my experimentation becausebody
'sfont-size
was also specified inpx
. - Should both source views be updated so that the font-size is consistent?
- Would this require a
rustdoc
change?
- Would this require a
- Where should the change be applied?
- For all
pre
elements? .package-page-container pre, .example-wrap pre
?
- For all