1. 23 3月, 2021 2 次提交
  2. 16 3月, 2021 1 次提交
    • S
      Fall-back to sans-serif if Arial is not available · 7134b0ee
      Simonas Kazlauskas 提交于
      Otherwise on systems where Arial is not available the system will
      fallback to a serif font, rather than a sans-serif one.
      
      This is especially relevant on acessibility-conscious setups (such as is
      mine) that have web-fonts disabled and a limited set of fonts available
      on the system.
      7134b0ee
  3. 10 3月, 2021 2 次提交
  4. 07 3月, 2021 1 次提交
  5. 03 3月, 2021 2 次提交
    • J
      Use Arial as fallback font instead of sans-serif. · f9cfe158
      Jacob Hoffman-Andrews 提交于
      On most platforms and browsers, `sans-serif` is equivalent to Arial.
      However, on Firefox on Ubuntu (and possibly other Linuxes), `sans-serif`
      is DejaVu Sans, a much wider font. This creates a larger shift in text
      when the custom fonts finally load. Arial is a web-safe font, and
      specifying it explicitly gives us more cross-platform consistency, as
      well as reducing the layout shift that happens when fonts load.
      f9cfe158
    • J
      Improve page load performance in rustdoc. · d3e7ffa7
      Jacob Hoffman-Andrews 提交于
      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.
      d3e7ffa7
  6. 26 2月, 2021 1 次提交
    • J
      Add optional woff2 versions of FiraSans. · c47903f0
      Jacob Hoffman-Andrews 提交于
      For browsers that support woff2 (most modern ones:
      https://caniuse.com/woff2), this offers a reduction in download size
      for these two fonts from 362k to 257k (32% reduction). It decreases the
      total page size for `struct.String.html` (counting all subresources) by
      about 2.5%.
      
      If this is interesting, I'm happy to apply the same treatment to the
      other fonts, but these two are the biggest.
      c47903f0
  7. 03 2月, 2021 1 次提交
  8. 02 2月, 2021 1 次提交
  9. 31 1月, 2021 6 次提交
  10. 06 1月, 2021 1 次提交
  11. 29 12月, 2020 2 次提交
  12. 24 12月, 2020 1 次提交
  13. 12 12月, 2020 2 次提交
  14. 10 12月, 2020 1 次提交
  15. 06 12月, 2020 1 次提交
  16. 25 11月, 2020 1 次提交
  17. 19 11月, 2020 1 次提交
  18. 19 10月, 2020 2 次提交
  19. 17 10月, 2020 1 次提交
  20. 15 10月, 2020 1 次提交
  21. 12 10月, 2020 1 次提交
  22. 08 10月, 2020 1 次提交
  23. 07 10月, 2020 1 次提交
  24. 04 10月, 2020 1 次提交
  25. 08 9月, 2020 1 次提交
  26. 24 8月, 2020 1 次提交
  27. 10 8月, 2020 2 次提交
  28. 22 7月, 2020 1 次提交