]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-gui/docblock-table.goml
Rollup merge of #105972 - notriddle:notriddle/anchor, r=GuillaumeGomez
[rust.git] / src / test / rustdoc-gui / docblock-table.goml
1 goto: "file://" + |DOC_PATH| + "/test_docs/doc_block_table/struct.DocBlockTable.html#method.func"
2
3 compare-elements-css: (".impl-items .docblock table th", ".top-doc .docblock table th", ["border"])
4 compare-elements-css: (".impl-items .docblock table td", ".top-doc .docblock table td", ["border"])
5
6 define-function: (
7     "check-colors",
8     (theme, border_color, zebra_stripe_color),
9     [
10         ("local-storage", {"rustdoc-use-system-theme": "false", "rustdoc-theme": |theme|}),
11         ("reload"),
12         ("assert-css", (".top-doc .docblock table tbody tr:nth-child(1)", {
13             "background-color": "rgba(0, 0, 0, 0)",
14         })),
15         ("assert-css", (".top-doc .docblock table tbody tr:nth-child(2)", {
16             "background-color": |zebra_stripe_color|,
17         })),
18         ("assert-css", (".top-doc .docblock table tbody tr:nth-child(3)", {
19             "background-color": "rgba(0, 0, 0, 0)",
20         })),
21         ("assert-css", (".top-doc .docblock table tbody tr:nth-child(4)", {
22             "background-color": |zebra_stripe_color|,
23         })),
24         ("assert-css", (".top-doc .docblock table td", {
25             "border-style": "solid",
26             "border-width": "1px",
27             "border-color": |border_color|,
28         })),
29         ("assert-css", (".top-doc .docblock table th", {
30             "border-style": "solid",
31             "border-width": "1px",
32             "border-color": |border_color|,
33         })),
34     ]
35 )
36
37 call-function: ("check-colors", {
38     "theme": "dark",
39     "border_color": "rgb(224, 224, 224)",
40     "zebra_stripe_color": "rgb(42, 42, 42)",
41 })
42 call-function: ("check-colors", {
43     "theme": "ayu",
44     "border_color": "rgb(92, 103, 115)",
45     "zebra_stripe_color": "rgb(25, 31, 38)",
46 })
47 call-function: ("check-colors", {
48     "theme": "light",
49     "border_color": "rgb(224, 224, 224)",
50     "zebra_stripe_color": "rgb(245, 245, 245)",
51 })