1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Remove unnecessary print CSS rules

These rules became unnecessary with PR 7697, over five years ago, since printing is now done from a `printContainer`-element rather than "directly" using the viewer.

Note how the *entire* `outerContainer`, which contains all of the DOM elements that were being manually hidden, is now being hidden during printing. Furthermore, note also how the print-canvases/images and their containers are using custom CSS-classes[1] rather than re-using the ones from the viewer.

---
[1] See the `printedPage` respectively `xfaPrintedPage` classes.
This commit is contained in:
Jonas Jenwald 2022-04-23 14:09:27 +02:00
parent 752dee5caa
commit 925a7bc58a

View file

@ -1321,44 +1321,9 @@ dialog :link {
}
@media print {
/* General rules for printing. */
body {
background: rgba(0, 0, 0, 0) none;
}
/* Rules for browsers that don't support mozPrintCallback. */
#sidebarContainer,
#secondaryToolbar,
.toolbar,
#errorWrapper,
.textLayer,
.canvasWrapper {
display: none;
}
#mainContainer,
#viewerContainer,
.page,
.page canvas {
position: static;
padding: 0;
margin: 0;
}
.page {
float: left;
display: none;
border: none;
box-shadow: none;
background-clip: content-box;
background-color: rgba(255, 255, 255, 1);
}
.page[data-loaded] {
display: block;
}
/* Rules for browsers that support PDF.js printing */
body[data-pdfjsprinting] #outerContainer {
display: none;
}