Bug 1269485 - Improve New Private Browsing start-page background styles r=Gijs

MozReview-Commit-ID: 6gju3cfipJ3
This commit is contained in:
Ricky Chien
2016-05-04 17:05:50 +08:00
parent 13eaa79ef4
commit dbb51e123b
4 changed files with 16 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
body.private .showNormal, html.private .showNormal,
body.normal .showPrivate, html.normal .showPrivate,
body[tpEnabled] .showTpDisabled, body[tpEnabled] .showTpDisabled,
body:not([tpEnabled]) .showTpEnabled { body:not([tpEnabled]) .showTpEnabled {
display: none !important; display: none !important;

View File

@@ -44,8 +44,8 @@ function setFavIcon(url) {
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
if (!PrivateBrowsingUtils.isContentWindowPrivate(window)) { if (!PrivateBrowsingUtils.isContentWindowPrivate(window)) {
document.body.classList.remove("private"); document.documentElement.classList.remove("private");
document.body.classList.add("normal"); document.documentElement.classList.add("normal");
document.title = stringBundle.GetStringFromName("title.normal"); document.title = stringBundle.GetStringFromName("title.normal");
document.getElementById("favicon") document.getElementById("favicon")
.setAttribute("href", FAVICON_QUESTION); .setAttribute("href", FAVICON_QUESTION);

View File

@@ -17,7 +17,7 @@
%aboutPrivateBrowsingDTD; %aboutPrivateBrowsingDTD;
]> ]>
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml" class="private">
<head> <head>
<link id="favicon" rel="icon" type="image/png"/> <link id="favicon" rel="icon" type="image/png"/>
<link rel="stylesheet" href="chrome://browser/content/aboutPrivateBrowsing.css" type="text/css" media="all"/> <link rel="stylesheet" href="chrome://browser/content/aboutPrivateBrowsing.css" type="text/css" media="all"/>
@@ -25,7 +25,7 @@
<script type="application/javascript;version=1.7" src="chrome://browser/content/aboutPrivateBrowsing.js"></script> <script type="application/javascript;version=1.7" src="chrome://browser/content/aboutPrivateBrowsing.js"></script>
</head> </head>
<body dir="&locale.dir;" class="private"> <body dir="&locale.dir;">
<p class="showNormal">&aboutPrivateBrowsing.notPrivate;</p> <p class="showNormal">&aboutPrivateBrowsing.notPrivate;</p>
<button xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" <button xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="startPrivateBrowsing" id="startPrivateBrowsing"

View File

@@ -5,10 +5,6 @@
@import url("chrome://global/skin/in-content/info-pages.css"); @import url("chrome://global/skin/in-content/info-pages.css");
:root { :root {
--color-background-light: #fff;
--color-background-dark: #303033;
--color-background-dark-purple: #1c023c;
--color-grey-lightest: #fbfbfb; --color-grey-lightest: #fbfbfb;
--color-grey: #b1b1b1; --color-grey: #b1b1b1;
@@ -16,21 +12,21 @@
--color-blue-dark: #0670cc; --color-blue-dark: #0670cc;
--color-blue-darker: #005bab; --color-blue-darker: #005bab;
--color-darkTheme-purple-text: #beb8cc;
--color-darkTheme-purple-text-strong: #ebe3fc;
--icon-margin: 64px; --icon-margin: 64px;
} }
html {
font-size: 1.5em;
}
html.private {
--in-content-page-color: #beb8cc;
--in-content-text-color: #beb8cc;
--in-content-page-background: #1c023c;
}
body { body {
padding: 40px; padding: 40px;
background-color: var(--color-background-light);
font-size: 1.5em;
}
body.private {
color: var(--color-darkTheme-purple-text);
background-color: var(--color-background-dark-purple);
} }
a:link { a:link {
@@ -82,7 +78,6 @@ p {
background-position: left, center; background-position: left, center;
font-weight: lighter; font-weight: lighter;
line-height: 1.5em; line-height: 1.5em;
color: var(--color-darkTheme-purple-text);
min-height: 64px; min-height: 64px;
-moz-margin-start: 0; -moz-margin-start: 0;
-moz-padding-start: calc(var(--icon-margin) + 24px); -moz-padding-start: calc(var(--icon-margin) + 24px);