cmd/present: Fixed printing of slides.
I moved print.css into styles.css - to make it obvious that it needs to be considered when modifying the styles.css. I use @media screen for all the framwork related css, this means the @media print doesn't have to start overriding each property - also there's less chance of a problem when something isn't overridden. Change-Id: Ic58e8c80df3339b55f67140a47866a232e0d30a3 Reviewed-on: https://go-review.googlesource.com/5526 Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
parent
51931f86bf
commit
e0e177e896
|
@ -1,56 +0,0 @@
|
|||
/* set page layout */
|
||||
@page {
|
||||
size: A4 landscape;
|
||||
}
|
||||
|
||||
body {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.slides {
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.slides > article {
|
||||
position: relative;
|
||||
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
||||
margin: 0 !important;
|
||||
page-break-inside: avoid;
|
||||
|
||||
text-shadow: none; /* disable shadow */
|
||||
|
||||
display: block !important;
|
||||
transform: translate(0) !important;
|
||||
-o-transform: translate(0) !important;
|
||||
-moz-transform: translate(0) !important;
|
||||
-webkit-transform: translate3d(0, 0, 0) !important;
|
||||
}
|
||||
|
||||
div.code {
|
||||
background: rgb(240, 240, 240);
|
||||
}
|
||||
|
||||
/* hide click areas */
|
||||
.slide-area, #prev-slide-area, #next-slide-area {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* add explicit links */
|
||||
a:link:after, a:visited:after {
|
||||
content: " (" attr(href) ") ";
|
||||
font-size: 50%;
|
||||
}
|
||||
|
||||
/* white background */
|
||||
body {
|
||||
background: rgb(255,255,255) !important;
|
||||
}
|
||||
|
||||
#help {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
}
|
|
@ -467,15 +467,6 @@ function addGeneralStyle() {
|
|||
document.querySelector('head').appendChild(el);
|
||||
};
|
||||
|
||||
function addPrintStyle() {
|
||||
var el = document.createElement('link');
|
||||
el.rel = 'stylesheet';
|
||||
el.type = 'text/css';
|
||||
el.media = "print";
|
||||
el.href = PERMANENT_URL_PREFIX + 'print.css';
|
||||
document.body.appendChild(el);
|
||||
};
|
||||
|
||||
function showHelpText() {
|
||||
};
|
||||
|
||||
|
@ -486,7 +477,6 @@ function handleDomLoaded() {
|
|||
|
||||
addFontStyle();
|
||||
addGeneralStyle();
|
||||
addPrintStyle();
|
||||
addEventListeners();
|
||||
|
||||
updateSlides();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
@media screen {
|
||||
/* Framework */
|
||||
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
|
@ -206,6 +206,50 @@ body {
|
|||
-moz-transform: translate(2260px);
|
||||
-webkit-transform: translate3d(2260px, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
/* Set page layout */
|
||||
@page {
|
||||
size: A4 landscape;
|
||||
}
|
||||
|
||||
body {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.slides > article {
|
||||
display: block;
|
||||
|
||||
position: relative;
|
||||
|
||||
page-break-inside: never;
|
||||
page-break-after: always;
|
||||
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
h2 {
|
||||
position: static !important;
|
||||
margin-top: 400px !important;
|
||||
margin-bottom: 100px !important;
|
||||
}
|
||||
|
||||
div.code {
|
||||
background: rgb(240, 240, 240);
|
||||
}
|
||||
|
||||
/* Add explicit links */
|
||||
a:link:after, a:visited:after {
|
||||
content: " (" attr(href) ") ";
|
||||
font-size: 50%;
|
||||
}
|
||||
|
||||
#help {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
/* Styles for slides */
|
||||
|
||||
|
|
Loading…
Reference in New Issue