diff options
| author | Jacob Hoffman-Andrews <github@hoffman-andrews.com> | 2022-01-06 19:48:24 -0500 |
|---|---|---|
| committer | Jacob Hoffman-Andrews <github@hoffman-andrews.com> | 2022-01-18 10:43:14 -0800 |
| commit | 6a5f8b1aef1417d7dc85b5d0a229d2db1930eb7c (patch) | |
| tree | b6dd1a95f8f47373a9b919dbc64dc368324631b1 /src/test/rustdoc-gui/sidebar-source-code.goml | |
| parent | 7bc7be860f99f4a40d45b0f74e2d01b02e072357 (diff) | |
| download | rust-6a5f8b1aef1417d7dc85b5d0a229d2db1930eb7c.tar.gz rust-6a5f8b1aef1417d7dc85b5d0a229d2db1930eb7c.zip | |
Simplify and unify rustdoc sidebar styles
This switches to just use size, weight, and spacing to distinguish headings in the sidebar. We no longer use boxes, horizontal bars, or centering to distinguish headings. This makes it much easier to understand the hierarchy of headings, and reduces visual noise. I also refactored how the mobile topbar works. Previously, we tried to shift around elements from the sidebar to make the topbar. Now, the topbar gets its own elements, which can be styled on their own. This makes styling and reasoning about those elements simpler. Because the heading font sizes are bigger, increase the sidebar width slightly. As a very minor change, removed version from the "All types" page. It's now only on the crate page.
Diffstat (limited to 'src/test/rustdoc-gui/sidebar-source-code.goml')
| -rw-r--r-- | src/test/rustdoc-gui/sidebar-source-code.goml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/rustdoc-gui/sidebar-source-code.goml b/src/test/rustdoc-gui/sidebar-source-code.goml index 98f4fdf4233..1c5eb9239ba 100644 --- a/src/test/rustdoc-gui/sidebar-source-code.goml +++ b/src/test/rustdoc-gui/sidebar-source-code.goml @@ -10,6 +10,7 @@ click: (10, 10) // We wait for the sidebar to be expanded (there is a 0.5s animation). wait-for: 600 assert-css: ("nav.sidebar.expanded", {"width": "300px"}) +assert-css: ("nav.sidebar.expanded a", {"font-size": "14.4px"}) // We collapse the sidebar. click: (10, 10) // We wait for the sidebar to be collapsed (there is a 0.5s animation). @@ -30,3 +31,6 @@ click: (10, 10) // We ensure that the class has been removed. assert-false: "nav.sidebar.expanded" assert: "nav.sidebar" + +// Check that the topbar is not visible +assert-property: (".mobile-topbar", {"offsetParent": "null"}) |
