]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-gui/code-color.goml
Rollup merge of #88858 - spektom:to_lower_upper_rev, r=dtolnay
[rust.git] / src / test / rustdoc-gui / code-color.goml
1 // The ayu theme has a different color for the "<code>" tags in the doc blocks. We need to
2 // check that the rule isn't applied on other "<code>" elements.
3 //
4 // While we're at it, we also check it for the other themes.
5 goto: file://|DOC_PATH|/test_docs/fn.foo.html
6 // If the text isn't displayed, the browser doesn't compute color style correctly...
7 show-text: true
8 // Set the theme to dark.
9 local-storage: {"rustdoc-theme": "dark", "rustdoc-preferred-dark-theme": "dark", "rustdoc-use-system-theme": "false"}
10 // We reload the page so the local storage settings are being used.
11 reload:
12
13 assert-css: (".docblock pre > code", {"color": "rgb(221, 221, 221)"}, ALL)
14 assert-css: (".docblock > p > code", {"color": "rgb(221, 221, 221)"}, ALL)
15
16 // Set the theme to ayu.
17 local-storage: {"rustdoc-theme": "ayu", "rustdoc-preferred-dark-theme": "ayu", "rustdoc-use-system-theme": "false"}
18 // We reload the page so the local storage settings are being used.
19 reload:
20
21 assert-css: (".docblock pre > code", {"color": "rgb(230, 225, 207)"}, ALL)
22 assert-css: (".docblock > p > code", {"color": "rgb(255, 180, 84)"}, ALL)
23
24 // Set the theme to light.
25 local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
26 // We reload the page so the local storage settings are being used.
27 reload:
28
29 assert-css: (".docblock pre > code", {"color": "rgb(0, 0, 0)"}, ALL)
30 assert-css: (".docblock > p > code", {"color": "rgb(0, 0, 0)"}, ALL)