Skip to content

Commit 96225b1

Browse files
Fix tooltip position if the documentation starts with a code block
1 parent 05630b0 commit 96225b1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/librustdoc/html/static/rustdoc.css

+10
Original file line numberDiff line numberDiff line change
@@ -1291,6 +1291,16 @@ h4 > .important-traits {
12911291

12921292
/* Media Queries */
12931293

1294+
@media (min-width: 701px) {
1295+
/* In case there is no documentation before a code block, we need to add some margin at the top
1296+
to prevent an overlay between the "collapse toggle" and the information tooltip.
1297+
However, it's needed needed with smaller screen width because the doc/code block is always put
1298+
"one line" below. */
1299+
.information:first-child > .tooltip {
1300+
margin-top: 16px;
1301+
}
1302+
}
1303+
12941304
@media (max-width: 700px) {
12951305
body {
12961306
padding-top: 0px;

0 commit comments

Comments
 (0)