Skip to content

Commit

Permalink
Remove unnecessary print CSS rules
Browse files Browse the repository at this point in the history
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, not 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.
  • Loading branch information
Snuffleupagus committed Apr 23, 2022
1 parent 752dee5 commit a061ed7
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions web/viewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a061ed7

Please sign in to comment.