]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #74555 - GuillaumeGomez:important-traits-popup, r=Manishearth
authorManish Goregaokar <manishsmail@gmail.com>
Mon, 20 Jul 2020 19:30:31 +0000 (12:30 -0700)
committerGitHub <noreply@github.com>
Mon, 20 Jul 2020 19:30:31 +0000 (12:30 -0700)
Improve "important traits" popup display on mobile

I implemented what @XAMPPRocky suggested in the [internals thread topic](https://internals.rust-lang.org/t/feedback-on-important-traits-rustdoc-feature/12752/18). I can confirm it works nicely.

r? @Manishearth

@Manishearth: By the way: I realized that when you click on the "i", you have to click again to make the popup disappear. Do you want me to extend the popup removal to any click outside the popup?

src/librustdoc/html/static/rustdoc.css

index 38709b445efae9aa89649872aa167af0053942dd..850a4b3cbc216f38dce50447e486f0e05b80c3e6 100644 (file)
@@ -1511,6 +1511,11 @@ h4 > .important-traits {
        #main > .line-numbers {
                margin-top: 0;
        }
+
+       .important-traits .important-traits-tooltiptext {
+               left: 0;
+               top: 100%;
+       }
 }
 
 @media print {