rustdoc: add test case for background color of the sidebar toggle button
This commit is contained in:
parent
a7c0c9f2bb
commit
26dccbf4cf
@ -418,7 +418,7 @@ nav.sub {
|
||||
background-color: var(--sidebar-background-color);
|
||||
}
|
||||
|
||||
#sidebar-toggle:hover, #sidebar-toggle > button:focus {
|
||||
#sidebar-toggle > button:hover:hover, #sidebar-toggle > button:focus {
|
||||
background-color: var(--sidebar-background-color-hover);
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,15 @@ assert-css: (
|
||||
"#source-sidebar .expand + .children a.selected",
|
||||
{"color": "rgb(0, 0, 0)", "background-color": "rgb(255, 255, 255)"},
|
||||
)
|
||||
// Without hover or focus.
|
||||
assert-css: ("#sidebar-toggle > button", {"background-color": "rgba(0, 0, 0, 0)"})
|
||||
// With focus.
|
||||
focus: "#sidebar-toggle > button"
|
||||
assert-css: ("#sidebar-toggle > button", {"background-color": "rgb(224, 224, 224)"})
|
||||
focus: ".search-input"
|
||||
// With hover.
|
||||
move-cursor-to: "#sidebar-toggle > button"
|
||||
assert-css: ("#sidebar-toggle > button", {"background-color": "rgb(224, 224, 224)"})
|
||||
// Without hover.
|
||||
assert-css: (
|
||||
"#source-sidebar .expand + .children > .files a:not(.selected)",
|
||||
@ -62,6 +71,15 @@ assert-css: (
|
||||
"#source-sidebar .expand + .children a.selected",
|
||||
{"color": "rgb(221, 221, 221)", "background-color": "rgb(51, 51, 51)"},
|
||||
)
|
||||
// Without hover or focus.
|
||||
assert-css: ("#sidebar-toggle > button", {"background-color": "rgba(0, 0, 0, 0)"})
|
||||
// With focus.
|
||||
focus: "#sidebar-toggle > button"
|
||||
assert-css: ("#sidebar-toggle > button", {"background-color": "rgb(103, 103, 103)"})
|
||||
focus: ".search-input"
|
||||
// With hover.
|
||||
move-cursor-to: "#sidebar-toggle > button"
|
||||
assert-css: ("#sidebar-toggle > button", {"background-color": "rgb(103, 103, 103)"})
|
||||
// Without hover.
|
||||
assert-css: (
|
||||
"#source-sidebar .expand + .children > .files a:not(.selected)",
|
||||
@ -94,6 +112,15 @@ assert-css: (
|
||||
"#source-sidebar .expand + .children a.selected",
|
||||
{"color": "rgb(255, 180, 76)", "background-color": "rgb(20, 25, 31)"},
|
||||
)
|
||||
// Without hover or focus.
|
||||
assert-css: ("#sidebar-toggle > button", {"background-color": "rgba(0, 0, 0, 0)"})
|
||||
// With focus.
|
||||
focus: "#sidebar-toggle > button"
|
||||
assert-css: ("#sidebar-toggle > button", {"background-color": "rgba(70, 70, 70, 0.33)"})
|
||||
focus: ".search-input"
|
||||
// With hover.
|
||||
move-cursor-to: "#sidebar-toggle > button"
|
||||
assert-css: ("#sidebar-toggle > button", {"background-color": "rgba(70, 70, 70, 0.33)"})
|
||||
// Without hover.
|
||||
assert-css: (
|
||||
"#source-sidebar .expand + .children > .files a:not(.selected)",
|
||||
|
Loading…
x
Reference in New Issue
Block a user