Bug 1319067 - Make the printing media section respect the font size. r=Gijs

This commit is contained in:
Matheus Longaray 2016-12-13 08:22:00 -05:00
Родитель e6b68c3ab4
Коммит c0a7494d43
4 изменённых файлов: 22 добавлений и 23 удалений

Просмотреть файл

@ -3,10 +3,20 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
/* This file defines specific rules for print preview when using simplify mode.
* These rules already exist on aboutReaderControls.css, however, we decoupled it
* from the original file so we don't need to load a bunch of extra queries that
* will not take effect when using the simplify page checkbox. This file defines
* styling for title and author on the header element. */
* Some of these rules (styling for title and author on the header element)
* already exist on aboutReaderControls.css, however, we decoupled it from the
* original file so we don't need to load a bunch of extra queries that will not
* take effect when using the simplify page checkbox. */
body {
padding-top: 0px;
padding-bottom: 0px;
}
#container {
max-width: 100%;
font-family: Georgia, "Times New Roman", serif;
}
.header > h1 {
font-size: 1.6em;

Просмотреть файл

@ -554,6 +554,13 @@ var Printing = {
headStyleElement.setAttribute("type", "text/css");
content.document.head.appendChild(headStyleElement);
// Create link element referencing simplifyMode.css and append it to head
headStyleElement = content.document.createElement("link");
headStyleElement.setAttribute("rel", "stylesheet");
headStyleElement.setAttribute("href", "chrome://global/content/simplifyMode.css");
headStyleElement.setAttribute("type", "text/css");
content.document.head.appendChild(headStyleElement);
content.document.body.innerHTML = "";
// Create container div (main element) and append it to body
@ -567,12 +574,6 @@ var Printing = {
headerElement.setAttribute("class", "header");
containerElement.appendChild(headerElement);
// Create style element for header div and import simplifyMode.css
let controlHeaderStyle = content.document.createElement("style");
controlHeaderStyle.setAttribute("scoped", "");
controlHeaderStyle.textContent = "@import url(\"chrome://global/content/simplifyMode.css\");";
headerElement.appendChild(controlHeaderStyle);
// Jam the article's title and byline into header div
let titleElement = content.document.createElement("h1");
titleElement.setAttribute("id", "reader-title");

Просмотреть файл

@ -6,19 +6,6 @@ body {
padding: 64px 51px;
}
@media print {
#container {
max-width: 100% !important;
font-size: 14px !important;
font-family: Georgia, "Times New Roman", serif !important;
}
body {
padding-top: 0px;
padding-bottom: 0px;
}
}
body.loaded {
transition: color 0.4s, background-color 0.4s;
}

Просмотреть файл

@ -55,6 +55,7 @@
figure,
.wp-caption {
margin: 0 0 10px 0 !important;
padding: 0 !important;
}
}