about summary refs log tree commit diff
path: root/src/test/rustdoc-gui/anchors.goml
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-109/+0
2023-01-06Use new block syntax for define-function in goml scriptsGuillaume Gomez-39/+41
2022-10-17Use named arguments to make test clearerGuillaume Gomez-27/+27
2022-10-16Clean up anchors.goml rustdoc GUI testGuillaume Gomez-147/+100
2022-10-07Update rustdoc-gui test to new browser-ui-test versionGuillaume Gomez-6/+6
2022-10-05rustdoc: remove unused CSS class `in-band`Michael Howell-9/+9
Since a7c25b29575c17434406b69773f8c2961af343b3 removed `in-band` from code headers, the only remaining uses of the `in-band` class are: https://github.com/rust-lang/rust/blob/02cd79afb8080fce8c8ce35533c54d8ecf8f390e/src/librustdoc/html/render/write_shared.rs#L520-L521 https://github.com/rust-lang/rust/blob/02cd79afb8080fce8c8ce35533c54d8ecf8f390e/src/librustdoc/html/templates/print_item.html#L2-L3 https://github.com/rust-lang/rust/blob/02cd79afb8080fce8c8ce35533c54d8ecf8f390e/src/librustdoc/html/render/context.rs#L637-L638 https://github.com/rust-lang/rust/blob/02cd79afb8080fce8c8ce35533c54d8ecf8f390e/src/librustdoc/html/render/mod.rs#L368-L369 https://github.com/rust-lang/rust/blob/02cd79afb8080fce8c8ce35533c54d8ecf8f390e/src/librustdoc/html/render/mod.rs#L401-L402 https://github.com/rust-lang/rust/blob/02cd79afb8080fce8c8ce35533c54d8ecf8f390e/src/librustdoc/html/static/js/main.js#L525 Since all of these uses are nested below `h1.fqn`, we can get rid of it, and the support code that was used for when `in-band` was part of item rendering.
2022-08-24Add color test for anchors in all themesGuillaume Gomez-1/+100
2022-08-24Extend GUI test to check colors for all srclink elementsGuillaume Gomez-3/+24
2022-07-05rustdoc: Add more semantic information to impl idspierwill-2/+2
Instead of generating `#impl`, `#impl-1`, etc., generate IDs like `#impl-Foo<M>`. Co-authored-by: Noah Lev <camelidcamel@gmail.com>
2022-02-09Update rustdoc tests for headings indentGuillaume Gomez-42/+0
2022-01-23tweak all sidebar coloursConrad Ludgate-1/+1
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-08Make source links look cleanerJacob Hoffman-Andrews-2/+4
Change from syntaxy-looking [src] to the plain word "source".
2021-12-31Rollup merge of #91480 - jsha:fewer-colors, r=GuillaumeGomezMatthias Krüger-1/+1
rustdoc: use smaller number of colors to distinguish items This reduces visual distractions when reading method signatures. As discussed in https://github.com/rust-lang/rust/issues/59845#issuecomment-974757191, this categorizes items into one of six colors (down from thirteen): - method, function (ochre `#AD7C37`) - trait, trait alias (dark slate blue `#6E4FC9`) - enum, struct, type alias, union, primitive (maroon `#AD378A`) - static, module, keyword, associated type, foreign type (steel blue `#3873AD`) - macro (green `#068000`) - generic params, self, Self (unmarked black `#000000`) I slightly tweaked the actual color values so they'd have the same lightness (previously the trait color stood out much more than the others). And I made the color for links in general consistently use steel blue (previously there was a slightly different color for "search-failed"). The ayu and dark themes have been updated according to the same logic. I haven't changed any of the color values in those themes, just their assignment to types. Demo: https://rustdoc.crud.net/jsha/fewer-colors/std/string/struct.String.html https://rustdoc.crud.net/jsha/fewer-colors/std/vec/struct.Vec.html https://rustdoc.crud.net/jsha/fewer-colors/std/io/trait.Read.html https://rustdoc.crud.net/jsha/fewer-colors/std/iter/trait.Iterator.html
2021-12-12Update browser-ui-test version and improve rustdoc-gui tests readabilityGuillaume Gomez-5/+5
2021-12-03Use fewer colors in rustdoc UIJacob Hoffman-Andrews-1/+1
This reduces visual distractions when reading method signatures.
2021-11-26Update test for anchors and headings positionGuillaume Gomez-1/+45
2021-11-25Improve testsGuillaume Gomez-0/+1
2021-11-24Update GUI tests for <a> colorGuillaume Gomez-8/+20
2021-11-22Set color for <a> in a more straightforward wayJacob Hoffman-Andrews-0/+17
Previously, we set the default color for <a> tags to black, and then had an override with a bunch of not() clauses to set anchors in docblocks to blue. Instead, we should set the default color for <a> to blue (or equivalent in other themes), and override it for places like the sidebar or search results, where we don't want them to be styled as links.