From f788035a58f87168ad5301aae3d24ef1ec153291 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Tue, 12 Apr 2022 13:30:37 +0200 Subject: [PATCH 1/2] Remove unnecessary `min-width` CSS rules - For the findbar/secondaryToolbar case, the `min-width` rule doesn't really make sense since it's way too small to be useful. Furthermore, the findbar is already specifying its own `min-width` and the secondaryToolbar will (thanks to its buttons) receive a correct/useful width. - The pageNumber-input already has an *explicit* `width` set, hence setting the `min-width` rule as well is completely unnecessary. - The treeItem-links are supposed to *compute* their `min-width`, and the static value was only added as a fallback for older browsers without `calc()` support. --- web/viewer.css | 3 --- 1 file changed, 3 deletions(-) diff --git a/web/viewer.css b/web/viewer.css index 97d81cf3d..409981841 100644 --- a/web/viewer.css +++ b/web/viewer.css @@ -429,7 +429,6 @@ select { position: absolute; z-index: 10000; height: auto; - min-width: 16px; padding: 0 4px; margin: 4px 2px; color: rgba(217, 217, 217, 1); @@ -1066,7 +1065,6 @@ select { .toolbarField.pageNumber { -moz-appearance: textfield; /* hides the spinner in moz */ - min-width: 16px; text-align: right; width: 40px; } @@ -1189,7 +1187,6 @@ a:focus > .thumbnail > .thumbnailSelectionRing, .treeItem > a { text-decoration: none; display: inline-block; - min-width: 95%; /* Subtract the right padding (left, in RTL mode) of the container: */ min-width: calc(100% - 4px); height: auto; From 3752b8975b27cba3608e43c34cbcd5a1c159baf2 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Tue, 12 Apr 2022 13:47:13 +0200 Subject: [PATCH 2/2] Reduce (some) duplication in the CSS rules for the sidebarViews With just a couple of exceptions, for the `thumbnailView`, all of the sidebarViews share the same basic styling which thus allows for some simplification. --- web/viewer.css | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/web/viewer.css b/web/viewer.css index 409981841..2cd7151c0 100644 --- a/web/viewer.css +++ b/web/viewer.css @@ -254,8 +254,6 @@ select { #outerContainer.sidebarResizing #sidebarContainer { /* Improve responsiveness and avoid visual glitches when the sidebar is resized. */ transition-duration: 0s; - /* Prevent e.g. the thumbnails being selected when the sidebar is resized. */ - user-select: none; } #outerContainer.sidebarMoving #sidebarContainer, @@ -1100,13 +1098,21 @@ select { padding-inline-start: 3px; } -#thumbnailView { +#thumbnailView, +#outlineView, +#attachmentsView, +#layersView { position: absolute; - width: calc(100% - 60px); + width: calc(100% - 8px); top: 0; bottom: 0; - padding: 10px 30px 0; + padding: 4px 4px 0; overflow: auto; + user-select: none; +} +#thumbnailView { + width: calc(100% - 60px); + padding: 10px 30px 0; } #thumbnailView > a:active, @@ -1167,18 +1173,6 @@ a:focus > .thumbnail > .thumbnailSelectionRing, color: rgba(255, 255, 255, 1); } -#outlineView, -#attachmentsView, -#layersView { - position: absolute; - width: calc(100% - 8px); - top: 0; - bottom: 0; - padding: 4px 4px 0; - overflow: auto; - user-select: none; -} - .treeWithDeepNesting > .treeItem, .treeItem > .treeItems { margin-inline-start: 20px;