diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-09-27 21:42:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-27 21:42:22 +0200 |
| commit | 4cef648c1ee90f064e3fdd7d5e0e30e283c6993c (patch) | |
| tree | 9ac9bd23dccd97ce5f5e0211d52686d38fb065b8 /tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-unwind.diff | |
| parent | ad57d5f27c9ce7752e3e7de50536065136a14f0c (diff) | |
| parent | b5b77a295972307c24dc0095ce693102c8e4884c (diff) | |
| download | rust-4cef648c1ee90f064e3fdd7d5e0e30e283c6993c.tar.gz rust-4cef648c1ee90f064e3fdd7d5e0e30e283c6993c.zip | |
Rollup merge of #102253 - jsha:css-contain, r=notriddle
rustdoc: use CSS containment to speed up render https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Containment This affected layout a little and required adjustments to the CSS to keep spacing the same. In particular, the margins of adjacent items usually overlap with each other. However, when an item has contain: layout, any margins of child nodes push out the size of the item itself. This was making spacing between items a little too big. To solve that, I removed margins in some places: in particular for certain classes that often occur at the end of a `details.rustdoc-toggle` block, I removed their bottom margin. Generally, the margins provided by the next item down are sufficient. Also remove an unnecessary margin-top on .code-header. In particular this helps with the problem that rustdoc in some situations can generate giant HTML pages, which can crash a Chrome tab on typical modern hardware, for instance: `https://docs.rs/iced-x86/1.16.0/iced_x86/code_asm/struct.CodeAssembler.html` (26MB, 409k DOM nodes). This doesn't, of course, universally solve the problem, but it pushes out the boundary of the largest page rustdoc can produce without crashing a browser tab. Demos: https://rustdoc.crud.net/jsha/css-contain/std/string/struct.String.html (warning: giant page, _may_ crash a browser tab) https://rustdoc.crud.net/jsha/css-contain-icedx86/iced_x86/code_asm/struct.CodeAssembler.html r? `@notriddle`
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-unwind.diff')
0 files changed, 0 insertions, 0 deletions
