diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-10-18 21:18:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-18 21:18:47 +0200 |
| commit | 2ae06ca3296ee45808919fabc9107fe184277bba (patch) | |
| tree | 45d2cb14e23b0bb39ec894cd45e3895728b87a55 /src/test | |
| parent | 18431b66ce68a58d3dde2c7143a6e6bfb08cae60 (diff) | |
| parent | d4e4b08b9b53f3dda7be3cc3bf8881db4180f736 (diff) | |
| download | rust-2ae06ca3296ee45808919fabc9107fe184277bba.tar.gz rust-2ae06ca3296ee45808919fabc9107fe184277bba.zip | |
Rollup merge of #103164 - notriddle:notriddle/media-min-width, r=GuillaumeGomez
rustdoc: remove CSS `@media (min-width: 701px)`
The two rules within it can and should be done without the separate media query:
* There ain't no rule saying a viewport can't be `700.5px` wide, since hardware pixels can be finer than CSS pixels.
<details><summary>Screenshot</summary>

</details>
* The rule for the first example-wrap child should probably apply on mobile.
<details><summary>Screenshots</summary>
## Before

## After

</details>
* The rule for the source sidebar is overriden by the mobile rule setting `max-width: 100vw`, so it can be merged with the rest of the styles.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/rustdoc-gui/sidebar-mobile-scroll.goml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/rustdoc-gui/sidebar-mobile-scroll.goml b/src/test/rustdoc-gui/sidebar-mobile-scroll.goml index f1cba172ee3..2449269b192 100644 --- a/src/test/rustdoc-gui/sidebar-mobile-scroll.goml +++ b/src/test/rustdoc-gui/sidebar-mobile-scroll.goml @@ -1,12 +1,12 @@ // This test ensures that the mobile sidebar preserves scroll position. goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html" // Switching to "mobile view" by reducing the width to 600px. -size: (600, 600) +size: (700, 600) assert-css: (".sidebar", {"display": "block", "left": "-1000px"}) // Scroll down. scroll-to: "//h2[@id='blanket-implementations']" -assert-window-property: {"pageYOffset": "651"} +assert-window-property: {"pageYOffset": "627"} // Open the sidebar menu. click: ".sidebar-menu-toggle" @@ -21,11 +21,11 @@ assert-window-property: {"pageYOffset": "0"} // Close the sidebar menu. Make sure the scroll position gets restored. click: ".sidebar-menu-toggle" wait-for-css: (".sidebar", {"left": "-1000px"}) -assert-window-property: {"pageYOffset": "651"} +assert-window-property: {"pageYOffset": "627"} // Now test that scrollability returns when the browser window is just resized. click: ".sidebar-menu-toggle" wait-for-css: (".sidebar", {"left": "0px"}) assert-window-property: {"pageYOffset": "0"} size: (900, 600) -assert-window-property: {"pageYOffset": "651"} +assert-window-property: {"pageYOffset": "627"} |
