diff options
| author | Jacob Hoffman-Andrews <github@hoffman-andrews.com> | 2021-02-19 17:54:41 -0800 |
|---|---|---|
| committer | Jacob Hoffman-Andrews <github@hoffman-andrews.com> | 2021-03-02 17:23:51 -0800 |
| commit | d3e7ffa7f548801d4a5784d314aabdafe9186af7 (patch) | |
| tree | 5175d64f234c1806da401f4123c0614cc09d9d03 /compiler/rustc_mir/src/transform/coverage/graph.rs | |
| parent | 94736c434ee154b30e2ec22ec112b79e3f6c5884 (diff) | |
| download | rust-d3e7ffa7f548801d4a5784d314aabdafe9186af7.tar.gz rust-d3e7ffa7f548801d4a5784d314aabdafe9186af7.zip | |
Improve page load performance in rustdoc.
Add font-display: swap. Per https://web.dev/font-display/, this prevents "flash of invisible text" during load by using a system font until the custom font is available. I've noticed this flash of invisible text occasionally when reading Rust docs. Add an explicit height to icons (which already had an explicit width) to allow browsers to lay out the page more accurately before the icons have been loaded. https://web.dev/optimize-cls/. Add min-width: 115px to the crate search dropdown. When the HTML first loads, this dropdown includes only the text "All crates." Later, JS loads the items underneath it, some of which are wider. That causes the dropdown to get wider, causing a distracting reflow. This sets a min-width based on the size that the dropdown eventually becomes based on the crates on doc.rust-lang.org, reducing page movement during load.
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/graph.rs')
0 files changed, 0 insertions, 0 deletions
