Skip to content

Commit

Permalink
Fix tooltip position if the documentation starts with a code block
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jul 22, 2020
1 parent 05630b0 commit 96225b1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -1291,6 +1291,16 @@ h4 > .important-traits {

/* Media Queries */

@media (min-width: 701px) {
/* In case there is no documentation before a code block, we need to add some margin at the top
to prevent an overlay between the "collapse toggle" and the information tooltip.
However, it's needed needed with smaller screen width because the doc/code block is always put
"one line" below. */
.information:first-child > .tooltip {
margin-top: 16px;
}
}

@media (max-width: 700px) {
body {
padding-top: 0px;
Expand Down

0 comments on commit 96225b1

Please sign in to comment.