Bug 1475025 - Vertically center the various error pages r=johannh
authorTrisha Gupta <guptatrisha97@gmail.com>
Tue, 17 Jul 2018 21:36:53 +0530
changeset 427085 b28ca0001c8e
parent 427084 53d0bbb455cb
child 427086 f1aadf806cfd
push id105404
push userebalazs@mozilla.com
push dateWed, 18 Jul 2018 15:40:04 +0000
treeherdermozilla-inbound@b28ca0001c8e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh
bugs1475025
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1475025 - Vertically center the various error pages r=johannh
browser/base/content/aboutNetError.js
browser/themes/shared/aboutNetError-new.css
toolkit/themes/shared/in-content/info-pages.inc.css
--- a/browser/base/content/aboutNetError.js
+++ b/browser/base/content/aboutNetError.js
@@ -173,17 +173,16 @@ function initPage() {
       // eslint-disable-next-line no-unsanitized/property
       sd.innerHTML = errDesc.innerHTML;
     } else {
       sd.textContent = getDescription();
     }
   }
   if (showCaptivePortalUI) {
     initPageCaptivePortal();
-    updateContainerPosition();
     return;
   }
   if (gIsCertError) {
     initPageCertError();
     updateContainerPosition();
     return;
   }
   addAutofocus("errorTryAgain");
@@ -290,17 +289,16 @@ function initPage() {
     // again won't help.
     document.getElementById("errorTryAgain").style.display = "none";
 
     var container = document.getElementById("errorLongDesc");
     for (var span of container.querySelectorAll("span.hostname")) {
       span.textContent = document.location.hostname;
     }
   }
-  updateContainerPosition();
 }
 
 function updateContainerPosition() {
   let textContainer = document.getElementById("text-container");
   textContainer.style.marginTop = `calc(50vh - ${textContainer.clientHeight / 2}px)`;
 }
 
 function initPageCaptivePortal() {
--- a/browser/themes/shared/aboutNetError-new.css
+++ b/browser/themes/shared/aboutNetError-new.css
@@ -8,16 +8,17 @@
   --exception-button-container-background: #F5F5F7;
 }
 
 body.certerror {
   border-style: solid;
   border-color: #ffe900;
   border-width: 16px;
   width: 100%;
+  justify-content: normal;
 }
 
 body.captiveportal .title {
   background-image: url("wifi.svg");
 }
 
 body.certerror .title {
   background-image: url("cert-error-new.svg");
--- a/toolkit/themes/shared/in-content/info-pages.inc.css
+++ b/toolkit/themes/shared/in-content/info-pages.inc.css
@@ -12,16 +12,17 @@
 /* Body and container */
 body {
   display: flex;
   flex-direction: column;
   box-sizing: border-box;
   min-height: 100vh;
   padding: 40px 48px;
   align-items: center;
+  justify-content: center;
 }
 
 body.wide-container {
   display: block;
 }
 
 .container {
   min-width: var(--in-content-container-min-width);