Skip to content

Commit

Permalink
Rollup merge of rust-lang#104896 - notriddle:notriddle/tooltip, r=Gui…
Browse files Browse the repository at this point in the history
…llaumeGomez

rustdoc: fix broken tooltip CSS

text `#ffffff` on background `#fdffd3` fails the [WCAG color contrast checker], and seems like a mistake in rust-lang@16b5590.

Making the cursor a pointer is misleading, since clicking it doesn't do anything.

[WCAG color contrast checker]: https://accessibleweb.com/color-contrast-checker/
  • Loading branch information
matthiaskrgr authored Nov 25, 2022
2 parents c72db77 + 75e4de6 commit 12e1b84
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,6 @@ pre.rust .doccomment {
.example-wrap .tooltip {
position: absolute;
display: block;
cursor: pointer;
left: -25px;
top: 5px;
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/static/css/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
--test-arrow-hover-background-color: #4e8bca;
--target-background-color: #fdffd3;
--target-border-color: #ad7c37;
--tooltip-background-color: #fdffd3;
--tooltip-background-color: #000;
--tooltip-color: #fff;
--kbd-color: #000;
--kbd-background: #fafbfc;
Expand Down
2 changes: 1 addition & 1 deletion src/test/rustdoc-gui/codeblock-tooltip.goml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ call-function: ("check-colors", {
})
call-function: ("check-colors", {
"theme": "light",
"background": "rgb(253, 255, 211)",
"background": "rgb(0, 0, 0)",
"color": "rgb(255, 255, 255)",
"border": "rgb(224, 224, 224)",
})

0 comments on commit 12e1b84

Please sign in to comment.