]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #60969 - Centril:rollup-3j71mqj, r=Centril
authorbors <bors@rust-lang.org>
Mon, 20 May 2019 00:37:48 +0000 (00:37 +0000)
committerbors <bors@rust-lang.org>
Mon, 20 May 2019 00:37:48 +0000 (00:37 +0000)
Rollup of 6 pull requests

Successful merges:

 - #60590 (Test interaction of unions with non-zero/niche-filling optimization)
 - #60745 (Perform constant propagation into terminators)
 - #60895 (Enable thumbv7a-pc-windows-msvc target build end to end in rust/master)
 - #60908 (Fix lints handling in rustdoc)
 - #60960 (Stop using gensyms in HIR lowering)
 - #60962 (Fix data types indication)

Failed merges:

r? @ghost

src/librustdoc/html/layout.rs
src/librustdoc/html/static/rustdoc.css

index acf019fd2254dfd52bf7804a66a708bfec525845..ae0bd1aafa8f159393fce8482bc54eb47e314e27 100644 (file)
@@ -182,14 +182,14 @@ pub fn render<T: fmt::Display, S: fmt::Display>(
         let p = SlashChecker(&p);
         if layout.logo.is_empty() {
             format!("<a href='{path}index.html'>\
-                     <img src='{static_root_path}rust-logo{suffix}.png' \
-                          alt='logo' width='100'></a>",
+                     <div class='logo-container'>\
+                     <img src='{static_root_path}rust-logo{suffix}.png' alt='logo'></div></a>",
                     path=p,
                     static_root_path=static_root_path,
                     suffix=page.resource_suffix)
         } else {
             format!("<a href='{}index.html'>\
-                     <img src='{}' alt='logo' width='100'></a>",
+                     <div class='logo-container'><img src='{}' alt='logo'></div></a>",
                     p,
                     layout.logo)
         }
index 522b6d60a18d82facc2d3a32d394fde68eb2dd01..4b122e73cbe57c337be8d01c8b71d5b6b72e54e2 100644 (file)
@@ -182,12 +182,25 @@ nav.sub {
        display: none !important;
 }
 
-.sidebar img {
+.logo-container {
+       height: 100px;
+       width: 100px;
+       position: relative;
        margin: 20px auto;
        display: block;
        margin-top: 10px;
 }
 
+.logo-container > img {
+       max-width: 100px;
+       max-height: 100px;
+       position: absolute;
+       left: 50%;
+       top: 50%;
+       transform: translate(-50%, -50%);
+       display: block;
+}
+
 .sidebar .location {
        border: 1px solid;
        font-size: 17px;
@@ -1030,14 +1043,20 @@ h3 > .collapse-toggle, h4 > .collapse-toggle {
                padding: 0;
        }
 
-       .sidebar img {
+       .sidebar .logo-container {
                width: 35px;
+               height: 35px;
                margin-top: 5px;
                margin-bottom: 5px;
                float: left;
                margin-left: 50px;
        }
 
+       .sidebar .logo-container > img {
+               max-width: 35px;
+               max-height: 35px;
+       }
+
        .sidebar-menu {
                position: fixed;
                z-index: 10;