Browse Source

Make the documentation logo hiDPI-friendly

This also sets the documentation logo to a fixed size in the CSS
to prevent reflows during page loading.
Hugo Locurcio 5 years ago
parent
commit
c50cd002ad
2 changed files with 7 additions and 0 deletions
  1. 7 0
      _static/css/custom.css
  2. BIN
      img/docs_logo.png

+ 7 - 0
_static/css/custom.css

@@ -593,6 +593,13 @@ kbd, .kbd {
     opacity: var(--logo-opacity);
 }
 
+.wy-side-nav-search > a img.logo {
+    /* Fixed size to prevent reflows and support hiDPI displays */
+    /* A 5 pixel margin is added on each side. The logo itself displays at 200×200 at 100% scaling. */
+    width: 210px;
+    height: 210px;
+}
+
 .wy-side-nav-search {
     background-color: var(--navbar-background-color);
 }

BIN
img/docs_logo.png