mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
34bc8fbea3
The CSS uses an inconsistent mix of both. This commit switches it to always use `src`.
23 lines
803 B
Plaintext
23 lines
803 B
Plaintext
// We check the background color on the jump to definition links in the src code page.
|
|
go-to: "file://" + |DOC_PATH| + "/src/link_to_definition/lib.rs.html"
|
|
|
|
define-function: (
|
|
"check-background-color",
|
|
(theme, background_color),
|
|
block {
|
|
// Set the theme.
|
|
set-local-storage: { "rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false" }
|
|
// We reload the page so the local storage settings are being used.
|
|
reload:
|
|
assert-css: (
|
|
"body.src .example-wrap pre.rust a",
|
|
{"background-color": |background_color|},
|
|
ALL,
|
|
)
|
|
},
|
|
)
|
|
|
|
call-function: ("check-background-color", ("ayu", "#333"))
|
|
call-function: ("check-background-color", ("dark", "#333"))
|
|
call-function: ("check-background-color", ("light", "#eee"))
|