rustdoc: add hover indicator for notable trait tooltip
This commit is contained in:
parent
c1d72de030
commit
b9302d7234
@ -1179,6 +1179,10 @@ a.test-arrow:hover {
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.code-header a.tooltip:hover {
|
||||||
|
color: var(--link-color);
|
||||||
|
}
|
||||||
|
|
||||||
/* placeholder thunk so that the mouse can easily travel from "(i)" to popover
|
/* placeholder thunk so that the mouse can easily travel from "(i)" to popover
|
||||||
the resulting "hover tunnel" is a stepped triangle, approximating
|
the resulting "hover tunnel" is a stepped triangle, approximating
|
||||||
https://bjk5.com/post/44698559168/breaking-down-amazons-mega-dropdown */
|
https://bjk5.com/post/44698559168/breaking-down-amazons-mega-dropdown */
|
||||||
|
@ -122,7 +122,7 @@ assert-count: ("//*[@class='tooltip popover']", 0)
|
|||||||
// Now check the colors.
|
// Now check the colors.
|
||||||
define-function: (
|
define-function: (
|
||||||
"check-colors",
|
"check-colors",
|
||||||
(theme, header_color, content_color, type_color, trait_color),
|
(theme, header_color, content_color, type_color, trait_color, link_color),
|
||||||
block {
|
block {
|
||||||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.NotableStructWithLongName.html"
|
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.NotableStructWithLongName.html"
|
||||||
// This is needed to ensure that the text color is computed.
|
// This is needed to ensure that the text color is computed.
|
||||||
@ -133,9 +133,21 @@ define-function: (
|
|||||||
// We reload the page so the local storage settings are being used.
|
// We reload the page so the local storage settings are being used.
|
||||||
reload:
|
reload:
|
||||||
|
|
||||||
|
assert-css: (
|
||||||
|
"//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']",
|
||||||
|
{"color": |content_color|},
|
||||||
|
ALL,
|
||||||
|
)
|
||||||
|
|
||||||
move-cursor-to: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
|
move-cursor-to: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
|
||||||
wait-for-count: (".tooltip.popover", 1)
|
wait-for-count: (".tooltip.popover", 1)
|
||||||
|
|
||||||
|
assert-css: (
|
||||||
|
"//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']",
|
||||||
|
{"color": |link_color|},
|
||||||
|
ALL,
|
||||||
|
)
|
||||||
|
|
||||||
assert-css: (
|
assert-css: (
|
||||||
".tooltip.popover h3",
|
".tooltip.popover h3",
|
||||||
{"color": |header_color|},
|
{"color": |header_color|},
|
||||||
@ -163,6 +175,7 @@ call-function: (
|
|||||||
"check-colors",
|
"check-colors",
|
||||||
{
|
{
|
||||||
"theme": "ayu",
|
"theme": "ayu",
|
||||||
|
"link_color": "rgb(57, 175, 215)",
|
||||||
"content_color": "rgb(230, 225, 207)",
|
"content_color": "rgb(230, 225, 207)",
|
||||||
"header_color": "rgb(255, 255, 255)",
|
"header_color": "rgb(255, 255, 255)",
|
||||||
"type_color": "rgb(255, 160, 165)",
|
"type_color": "rgb(255, 160, 165)",
|
||||||
@ -174,6 +187,7 @@ call-function: (
|
|||||||
"check-colors",
|
"check-colors",
|
||||||
{
|
{
|
||||||
"theme": "dark",
|
"theme": "dark",
|
||||||
|
"link_color": "rgb(210, 153, 29)",
|
||||||
"content_color": "rgb(221, 221, 221)",
|
"content_color": "rgb(221, 221, 221)",
|
||||||
"header_color": "rgb(221, 221, 221)",
|
"header_color": "rgb(221, 221, 221)",
|
||||||
"type_color": "rgb(45, 191, 184)",
|
"type_color": "rgb(45, 191, 184)",
|
||||||
@ -185,6 +199,7 @@ call-function: (
|
|||||||
"check-colors",
|
"check-colors",
|
||||||
{
|
{
|
||||||
"theme": "light",
|
"theme": "light",
|
||||||
|
"link_color": "rgb(56, 115, 173)",
|
||||||
"content_color": "rgb(0, 0, 0)",
|
"content_color": "rgb(0, 0, 0)",
|
||||||
"header_color": "rgb(0, 0, 0)",
|
"header_color": "rgb(0, 0, 0)",
|
||||||
"type_color": "rgb(173, 55, 138)",
|
"type_color": "rgb(173, 55, 138)",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user