Bug 1475025 - Vertically center the various error pages r=johannh
authorTrisha Gupta <guptatrisha97@gmail.com>
Tue, 17 Jul 2018 21:36:53 +0530
changeset 427161 b28ca0001c8e7f30a65cb18e65f750e460a68580
parent 427160 53d0bbb455cbe7b28f8303f70f781a98175a8f75
child 427162 f1aadf806cfdd0b77c545b4ac60c8f079ac83acd
push id34295
push usershindli@mozilla.com
push dateWed, 18 Jul 2018 21:45:46 +0000
treeherdermozilla-central@5a8107262015 [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);