2023-07-14 16:38:01 -07:00
|
|
|
// We check the background color on the jump to definition links in the src code page.
|
2024-04-05 21:38:55 +02:00
|
|
|
include: "utils.goml"
|
2023-04-11 19:11:34 +02:00
|
|
|
go-to: "file://" + |DOC_PATH| + "/src/link_to_definition/lib.rs.html"
|
2021-09-12 15:43:30 +02:00
|
|
|
|
2022-10-23 15:40:56 +02:00
|
|
|
define-function: (
|
|
|
|
"check-background-color",
|
2024-04-01 21:11:22 +02:00
|
|
|
[theme, background_color],
|
2023-01-06 15:18:51 +01:00
|
|
|
block {
|
2024-04-05 21:38:55 +02:00
|
|
|
call-function: ("switch-theme", {"theme": |theme|})
|
2023-01-06 15:18:51 +01:00
|
|
|
assert-css: (
|
2023-07-14 16:38:01 -07:00
|
|
|
"body.src .example-wrap pre.rust a",
|
2022-10-23 15:40:56 +02:00
|
|
|
{"background-color": |background_color|},
|
|
|
|
ALL,
|
2023-01-06 15:18:51 +01:00
|
|
|
)
|
|
|
|
},
|
2021-12-12 18:28:58 +01:00
|
|
|
)
|
2021-09-12 15:43:30 +02:00
|
|
|
|
2024-04-01 21:11:22 +02:00
|
|
|
call-function: ("check-background-color", {
|
|
|
|
"theme": "ayu",
|
|
|
|
"background_color": "#333",
|
|
|
|
})
|
|
|
|
call-function: ("check-background-color", {
|
|
|
|
"theme": "dark",
|
|
|
|
"background_color": "#333",
|
|
|
|
})
|
|
|
|
call-function: ("check-background-color", {
|
|
|
|
"theme": "light",
|
|
|
|
"background_color": "#eee",
|
|
|
|
})
|