about summary refs log tree commit diff
path: root/src/test/rustdoc-gui/headings.goml
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-234/+0
2023-01-06Use new block syntax for define-function in goml scriptsGuillaume Gomez-23/+23
2022-10-22Use functions for headings rustodoc GUI testGuillaume Gomez-100/+76
2022-10-10rustdoc: remove unneeded `<div>` wrapper from sidebar DOMMichael Howell-2/+2
When this was added, the sidebar had a bit more complex style. It can be removed, now.
2022-10-07Update rustdoc-gui test to new browser-ui-test versionGuillaume Gomez-6/+6
2022-09-19Remove useless color assertions on 0px bordersMichael Howell-12/+12
2022-08-24Extend GUI test to check colors for all srclink elementsGuillaume Gomez-3/+3
2022-07-27Add GUI tests for headings border and text colorGuillaume Gomez-3/+97
2022-07-05rustdoc: Add more semantic information to impl idspierwill-6/+6
Instead of generating `#impl`, `#impl-1`, etc., generate IDs like `#impl-Foo<M>`. Co-authored-by: Noah Lev <camelidcamel@gmail.com>
2022-06-20Improve loading of crates.js and sidebar-items.jsJacob Hoffman-Andrews-2/+2
Now that the "All Crates" dropdown is only rendered on the search results page, there is no need to load crates.js on most pages. Load it only on crate pages. Also, add the `defer` attribute so it does not block page rendering. For sidebar-items.js, move the script tag to `<head>`. Since it already has the defer attribute it won't block loading. The defer attribute does preserve ordering between scripts, so instead of the callback on load, it can set a global variable on load, which is slightly simpler. Also, since it is required to finish rendering the page, beginning its load earlier is better. Remove generation and handling of sidebar-vars. Everything there can be computed with information available in JS via other means. Remove the "other" wrapper in the sidebar. It was unnecessary. Remove excess script fields
2022-02-08rustdoc: tweak line and ¶ spacing for a11yJacob Hoffman-Andrews-36/+35
The W3C Web Content Accessibility Guidelines specify a minimum line spacing of 1.5 and a minimum paragraph spacing of 1.5 times the line spacing. Our current line spacing (implemented by line-height) is 1.4, so it's a small bump to go up to 1.5. Similarly, we have a paragraph spacing of 0.6em. Bump that to 0.75em (which is 1.5 times the 0.5em distance between lines). Also, fix all the font sizes so instead of being round-ish numbers in rem (like 1.1rem, 1.2rem), they are round numbers in pixels. Ensure each font size is at least 2 pixels different than the nearest other font size, so distinctions can be clearly seen. Overall the font-sizes are mostly staying the same, being rounded up or down as appropriate. Remove a few unused styles. Simplify the display of the mobile-topbar location, by setting its margins to auto rather than trying to size it exactly to the topbar.
2022-01-18Remove horizontal lines at top of pageJacob Hoffman-Andrews-4/+0
They are not needed to separate the search bar and the title, which are visually distinct on their own.
2022-01-18Simplify and unify rustdoc sidebar stylesJacob Hoffman-Andrews-1/+1
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.
2022-01-17Add staged_api for testsJacob Hoffman-Andrews-0/+13
2022-01-08Make source links look cleanerJacob Hoffman-Andrews-4/+4
Change from syntaxy-looking [src] to the plain word "source".
2021-11-20Rollup merge of #90089 - jsha:enum-fields-headings, r=camelid,GuillaumeGomezMatthias Krüger-20/+20
Improve display of enum variants Use h3 and h4 for the variant name and the "Fields" subheading. Remove the "of T" part of the "Fields" subheading. Remove border-bottom from "Fields" subheading. Move docblock below "Fields" listing. Fixes #90061 Demo: https://jacob.hoffman-andrews.com/rust/xmlparser-updated/xmlparser/enum.Token.html#variants https://jacob.hoffman-andrews.com/rust/fix-enum-variants/std/io/enum.ErrorKind.html#variants https://jacob.hoffman-andrews.com/rust/fix-enum-variants/std/result/enum.Result.html#variants r? ``@camelid``
2021-11-04Fix missing bottom border for headings in sidebarGuillaume Gomez-0/+3
2021-10-30Improve display of enum variantsJacob Hoffman-Andrews-20/+20
Use h3 and h4 for the variant name and the "Fields" subheading. Remove the "of T" part of the "Fields" subheading. Remove border-bottom from "Fields" subheading. Move docblock below "Fields" listing.
2021-10-30Remove underlines from non-top docblocks.Jacob Hoffman-Andrews-0/+153
We still had a number of places where underlined section headings would show up, like under Implementations.