We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 984eab5 commit f28a8caCopy full SHA for f28a8ca
2 files changed
src/librustdoc/html/static/css/rustdoc.css
@@ -1114,8 +1114,7 @@ pre.rust .doccomment {
1114
top: 5px;
1115
}
1116
1117
-.example-wrap .tooltip::after {
1118
- display: none;
+.example-wrap .tooltip:hover::after {
1119
text-align: center;
1120
padding: 5px 3px 3px 3px;
1121
border-radius: 6px;
@@ -1130,35 +1129,30 @@ pre.rust .doccomment {
1130
1129
color: var(--tooltip-color);
1131
1132
1133
-.example-wrap .tooltip::before {
+.example-wrap .tooltip:hover::before {
1134
content: " ";
1135
position: absolute;
1136
top: 50%;
1137
left: 16px;
1138
margin-top: -5px;
1139
1140
z-index: 1;
1141
border: 5px solid transparent;
1142
border-right-color: var(--tooltip-background-color);
1143
1144
1145
-.example-wrap.ignore .tooltip::after {
+.example-wrap.ignore .tooltip:hover::after {
1146
content: "This example is not tested";
1147
1148
-.example-wrap.compile_fail .tooltip::after {
+.example-wrap.compile_fail .tooltip:hover::after {
1149
content: "This example deliberately fails to compile";
1150
1151
-.example-wrap.should_panic .tooltip::after {
+.example-wrap.should_panic .tooltip:hover::after {
1152
content: "This example panics";
1153
1154
-.example-wrap.edition .tooltip::after {
+.example-wrap.edition .tooltip:hover::after {
1155
content: "This code runs with edition " attr(data-edition);
1156
1157
1158
-.example-wrap .tooltip:hover::before, .example-wrap .tooltip:hover::after {
1159
- display: inline;
1160
-}
1161
-
1162
.example-wrap.compile_fail .tooltip,
1163
.example-wrap.should_panic .tooltip,
1164
.example-wrap.ignore .tooltip {
src/test/rustdoc-gui/codeblock-tooltip.goml
@@ -20,7 +20,7 @@ define-function: (
20
{"border-left": "2px solid rgba(255, 0, 0, 0.5)"},
21
)),
22
23
- ("move-cursor-to", ".docblock .example-wrap.compile_fail"),
+ ("move-cursor-to", ".docblock .example-wrap.compile_fail .tooltip"),
24
25
("assert-css", (
26
".docblock .example-wrap.compile_fail .tooltip",
@@ -60,7 +60,7 @@ define-function: (
60
61
62
63
- ("move-cursor-to", ".docblock .example-wrap.should_panic"),
+ ("move-cursor-to", ".docblock .example-wrap.should_panic .tooltip"),
64
65
66
".docblock .example-wrap.should_panic .tooltip",
@@ -100,7 +100,7 @@ define-function: (
100
{"border-left": "2px solid rgba(255, 142, 0, 0.6)"},
101
102
103
- ("move-cursor-to", ".docblock .example-wrap.ignore"),
+ ("move-cursor-to", ".docblock .example-wrap.ignore .tooltip"),
104
105
106
".docblock .example-wrap.ignore .tooltip",
0 commit comments