Commit graph

8 commits

Author SHA1 Message Date
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00
Michael Howell
d4e4b08b9b rustdoc: change mobile breakpoint to match CSS
Since it's possible to have a 700.5px viewport width, the JS needs to not
switch to mobile mode in such a setup.
2022-10-17 19:26:15 -07:00
Guillaume Gomez
8d19d53c60 Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
Michael Howell
8308c4bd35 rustdoc: update test cases for <section> tags in traits 2022-09-30 11:58:58 -07:00
Jacob Hoffman-Andrews
b5b77a2959 Update src/test/rustdoc-gui/sidebar-mobile-scroll.goml
Co-authored-by: Michael Howell <michael@notriddle.com>
2022-09-27 10:52:05 -07:00
Jacob Hoffman-Andrews
8846c0853d 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.
2022-09-27 09:21:24 -07:00
Guillaume Gomez
d010f95af1 Update tests for new browser-ui-test version 2022-09-11 22:09:23 +02:00
Michael Howell
6b60bc6408 rustdoc: improve scroll locking in the rustdoc mobile sidebars
This commit ports the scroll locking behavior from the source sidebar to the
regular sidebar, and also fixes some bad behavior where opening a "mobile"
sidebar, and growing the viewport so that the "desktop" mode without scroll
locking is activated, could potentially leave the page stuck.

This does not affect the behavior on larger screens. Only small ones, where
the sidebar covers up the main content.
2022-07-05 11:12:18 -07:00