From 925a7bc58abd1afdb55ae0a8ebc75e173dec7bf8 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 23 Apr 2022 14:09:27 +0200 Subject: [PATCH] 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. --- web/viewer.css | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/web/viewer.css b/web/viewer.css index 898bcd2ca..d3f9b3ed9 100644 --- a/web/viewer.css +++ b/web/viewer.css @@ -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; }