From 04ed5ddebac287849a1787c07f5ee0fad1b03f31 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Tue, 18 Apr 2023 12:01:08 +0200 Subject: [PATCH] Introduce some `:is` usage in the PDFViewer CSS --- web/pdf_viewer.css | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/web/pdf_viewer.css b/web/pdf_viewer.css index 0e806e41b9448..705419c936ee0 100644 --- a/web/pdf_viewer.css +++ b/web/pdf_viewer.css @@ -105,8 +105,7 @@ } /*#endif*/ -.pdfViewer.scrollHorizontal, -.pdfViewer.scrollWrapped, +.pdfViewer:is(.scrollHorizontal, .scrollWrapped), .spread { margin-inline: 3.5px; text-align: center; @@ -120,31 +119,24 @@ /*#if GENERIC*/ .pdfViewer.removePageBorders, /*#endif*/ -.pdfViewer.scrollHorizontal .spread, -.pdfViewer.scrollWrapped .spread { +.pdfViewer:is(.scrollHorizontal, .scrollWrapped) .spread { margin-inline: 0; } -.spread .page, -.spread .dummyPage, -.pdfViewer.scrollHorizontal .page, -.pdfViewer.scrollWrapped .page, -.pdfViewer.scrollHorizontal .spread, -.pdfViewer.scrollWrapped .spread { +.spread :is(.page, .dummyPage), +.pdfViewer:is(.scrollHorizontal, .scrollWrapped) :is(.page, .spread) { display: inline-block; vertical-align: middle; } .spread .page, -.pdfViewer.scrollHorizontal .page, -.pdfViewer.scrollWrapped .page { +.pdfViewer:is(.scrollHorizontal, .scrollWrapped) .page { margin-inline: var(--spreadHorizontalWrapped-margin-LR); } /*#if GENERIC*/ .pdfViewer.removePageBorders .spread .page, -.pdfViewer.removePageBorders.scrollHorizontal .page, -.pdfViewer.removePageBorders.scrollWrapped .page { +.pdfViewer.removePageBorders:is(.scrollHorizontal, .scrollWrapped) .page { margin-inline: 5px; } /*#endif*/