diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2020-07-22 09:29:17 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-22 09:29:17 -0700 |
| commit | 05a24661a33555c4cd46cee5ef304f1f55f5186b (patch) | |
| tree | 2d3854674532fa3fcc201ba6d1dea0c8c68ef1f2 | |
| parent | 3de0de1dedeed9c11dc419b0c3f9ad03a9c815b4 (diff) | |
| parent | 96225b15e5480dae3c7e0f3df044553502c82d66 (diff) | |
| download | rust-05a24661a33555c4cd46cee5ef304f1f55f5186b.tar.gz rust-05a24661a33555c4cd46cee5ef304f1f55f5186b.zip | |
Rollup merge of #74635 - GuillaumeGomez:fix-tooltip-pos, r=Manishearth
Fix tooltip position if the documentation starts with a code block Fixes #74321. Before:  After:  And in case there is text, it is not being applied:  And on mobile it isn't needed so it's not "activated":  r? @rust-lang/rustdoc
| -rw-r--r-- | src/librustdoc/html/static/rustdoc.css | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 850a4b3cbc2..d0312d77a7c 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -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; |
