1 // This test is to ensure that the anchors (`ยง`) have the expected color and position.
5 (theme, main_color, title_color, fqn_color, fqn_type_color, src_link_color, sidebar_link_color),
7 ("goto", "file://" + |DOC_PATH| + "/staged_api/struct.Foo.html"),
8 // This is needed to ensure that the text color is computed.
12 ("local-storage", {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}),
13 // We reload the page so the local storage settings are being used.
16 ("assert-css", ("#toggle-all-docs", {"color": |main_color|})),
17 ("assert-css", (".fqn a:nth-of-type(1)", {"color": |fqn_color|})),
18 ("assert-css", (".fqn a:nth-of-type(2)", {"color": |fqn_type_color|})),
20 ".rightside .srclink",
21 {"color": |src_link_color|, "text-decoration": "none solid " + |src_link_color|},
25 "compare-elements-css",
26 (".rightside .srclink", ".rightside.srclink", ["color", "text-decoration"]),
29 "compare-elements-css",
30 (".main-heading .srclink", ".rightside.srclink", ["color", "text-decoration"]),
33 ("move-cursor-to", ".main-heading .srclink"),
35 ".main-heading .srclink",
36 {"color": |src_link_color|, "text-decoration": "underline solid " + |src_link_color|},
38 ("move-cursor-to", ".impl-items .rightside .srclink"),
40 ".impl-items .rightside .srclink",
41 {"color": |src_link_color|, "text-decoration": "none solid " + |src_link_color|},
43 ("move-cursor-to", ".impl-items .rightside.srclink"),
45 ".impl-items .rightside.srclink",
46 {"color": |src_link_color|, "text-decoration": "none solid " + |src_link_color|},
49 ("goto", "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"),
50 // Since we changed page, we need to set the theme again.
51 ("local-storage", {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}),
52 // We reload the page so the local storage settings are being used.
55 ("assert-css", ("#top-doc-prose-title", {"color": |title_color|})),
57 ("assert-css", (".sidebar a", {"color": |sidebar_link_color|})),
58 ("assert-css", ("h1.fqn a", {"color": |title_color|})),
60 // We move the cursor over the "Implementations" title so the anchor is displayed.
61 ("move-cursor-to", "h2#implementations"),
62 ("assert-css", ("h2#implementations a.anchor", {"color": |main_color|})),
64 // Same thing with the impl block title.
65 ("move-cursor-to", "#impl-HeavilyDocumentedStruct"),
66 ("assert-css", ("#impl-HeavilyDocumentedStruct a.anchor", {"color": |main_color|})),
68 ("assert-css", ("#title-for-struct-impl-item-doc", {"margin-left": "0px"})),
76 "main_color": "rgb(197, 197, 197)",
77 "title_color": "rgb(255, 255, 255)",
78 "fqn_color": "rgb(255, 255, 255)",
79 "fqn_type_color": "rgb(255, 160, 165)",
80 "src_link_color": "rgb(57, 175, 215)",
81 "sidebar_link_color": "rgb(83, 177, 219)",
88 "main_color": "rgb(221, 221, 221)",
89 "title_color": "rgb(221, 221, 221)",
90 "fqn_color": "rgb(221, 221, 221)",
91 "fqn_type_color": "rgb(45, 191, 184)",
92 "src_link_color": "rgb(210, 153, 29)",
93 "sidebar_link_color": "rgb(253, 191, 53)",
100 "main_color": "rgb(0, 0, 0)",
101 "title_color": "rgb(0, 0, 0)",
102 "fqn_color": "rgb(0, 0, 0)",
103 "fqn_type_color": "rgb(173, 55, 138)",
104 "src_link_color": "rgb(56, 115, 173)",
105 "sidebar_link_color": "rgb(53, 109, 164)",