From 3752b8975b27cba3608e43c34cbcd5a1c159baf2 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Tue, 12 Apr 2022 13:47:13 +0200 Subject: [PATCH] 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;