1 // This test is to ensure that the anchors (`ยง`) have the expected color and position.
5 (theme, main_color, title_color, main_heading_color, main_heading_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: (".main-heading h1 a:nth-of-type(1)", {"color": |main_heading_color|})
18 assert-css: (".main-heading a:nth-of-type(2)", {"color": |main_heading_type_color|})
20 ".rightside .srclink",
21 {"color": |src_link_color|, "text-decoration": "none solid " + |src_link_color|},
24 compare-elements-css: (
25 ".rightside .srclink",
27 ["color", "text-decoration"],
29 compare-elements-css: (
30 ".main-heading .srclink",
32 ["color", "text-decoration"],
35 move-cursor-to: ".main-heading .srclink"
37 ".main-heading .srclink",
38 {"color": |src_link_color|, "text-decoration": "underline solid " + |src_link_color|},
40 move-cursor-to: ".impl-items .rightside .srclink"
42 ".impl-items .rightside .srclink",
43 {"color": |src_link_color|, "text-decoration": "none solid " + |src_link_color|},
45 move-cursor-to: ".impl-items .rightside.srclink"
47 ".impl-items .rightside.srclink",
48 {"color": |src_link_color|, "text-decoration": "none solid " + |src_link_color|},
51 goto: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
52 // Since we changed page, we need to set the theme again.
53 local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
54 // We reload the page so the local storage settings are being used.
57 assert-css: ("#top-doc-prose-title", {"color": |title_color|})
59 assert-css: (".sidebar a", {"color": |sidebar_link_color|})
60 assert-css: (".main-heading h1 a", {"color": |title_color|})
62 // We move the cursor over the "Implementations" title so the anchor is displayed.
63 move-cursor-to: "h2#implementations"
64 assert-css: ("h2#implementations a.anchor", {"color": |main_color|})
66 // Same thing with the impl block title.
67 move-cursor-to: "#impl-HeavilyDocumentedStruct"
68 assert-css: ("#impl-HeavilyDocumentedStruct a.anchor", {"color": |main_color|})
70 assert-css: ("#title-for-struct-impl-item-doc", {"margin-left": "0px"})
78 "main_color": "rgb(197, 197, 197)",
79 "title_color": "rgb(255, 255, 255)",
80 "main_heading_color": "rgb(255, 255, 255)",
81 "main_heading_type_color": "rgb(255, 160, 165)",
82 "src_link_color": "rgb(57, 175, 215)",
83 "sidebar_link_color": "rgb(83, 177, 219)",
90 "main_color": "rgb(221, 221, 221)",
91 "title_color": "rgb(221, 221, 221)",
92 "main_heading_color": "rgb(221, 221, 221)",
93 "main_heading_type_color": "rgb(45, 191, 184)",
94 "src_link_color": "rgb(210, 153, 29)",
95 "sidebar_link_color": "rgb(253, 191, 53)",
102 "main_color": "rgb(0, 0, 0)",
103 "title_color": "rgb(0, 0, 0)",
104 "main_heading_color": "rgb(0, 0, 0)",
105 "main_heading_type_color": "rgb(173, 55, 138)",
106 "src_link_color": "rgb(56, 115, 173)",
107 "sidebar_link_color": "rgb(53, 109, 164)",