diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-07-14 19:53:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-14 19:53:40 +0200 |
| commit | e0d72d0f9266904fe9eecc2b9eee90e8866abe3e (patch) | |
| tree | 727693a5511707a7301246abfebdd76e9e6b8c4e /src/test | |
| parent | e932ba31e1a69deccbab59b53b0895014508035a (diff) | |
| parent | 46b4b377b8d3f09f63ec8b5bede229cd09d6aa64 (diff) | |
| download | rust-e0d72d0f9266904fe9eecc2b9eee90e8866abe3e.tar.gz rust-e0d72d0f9266904fe9eecc2b9eee90e8866abe3e.zip | |
Rollup merge of #87125 - GuillaumeGomez:ayu-code-color, r=notriddle
Fix Ayu theme <code> color Fixes #87072 (the second regression). r? `@notriddle`
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/rustdoc-gui/ayu-code-tag-colors.goml | 13 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/src/test_docs/lib.rs | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/test/rustdoc-gui/ayu-code-tag-colors.goml b/src/test/rustdoc-gui/ayu-code-tag-colors.goml new file mode 100644 index 00000000000..50af36fa3d6 --- /dev/null +++ b/src/test/rustdoc-gui/ayu-code-tag-colors.goml @@ -0,0 +1,13 @@ +// The ayu theme has a different color for the "<code>" tags in the doc blocks. We need to +// check that the rule isn't applied on other "<code>" elements. +goto: file://|DOC_PATH|/test_docs/enum.AnEnum.html +// We need to show the text, otherwise the colors aren't "computed" by the web browser. +show-text: true +// We set the theme to ayu. +local-storage: {"rustdoc-theme": "ayu", "rustdoc-preferred-dark-theme": "ayu", "rustdoc-use-system-theme": "false"} +// We reload to get the text appearing and the theme applied. +reload: + +assert-css: (".docblock code", {"color": "rgb(255, 180, 84)"}, ALL) +// It includes variants and the "titles" as well (for example: "impl RefUnwindSafe for AnEnum"). +assert-css: ("div:not(.docblock) > code", {"color": "rgb(197, 197, 197)"}, ALL) diff --git a/src/test/rustdoc-gui/src/test_docs/lib.rs b/src/test/rustdoc-gui/src/test_docs/lib.rs index 1b9f652120e..85dd8805fbc 100644 --- a/src/test/rustdoc-gui/src/test_docs/lib.rs +++ b/src/test/rustdoc-gui/src/test_docs/lib.rs @@ -96,6 +96,7 @@ pub fn check_list_code_block() {} #[doc(cfg(unix))] pub fn replaced_function() {} +/// Some doc with `code`! pub enum AnEnum { WithVariants { and: usize, sub: usize, variants: usize }, } |
