From a3ab2f679077ea5a3058934c8ee5de70f1c2c685 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Mon, 20 Mar 2023 16:34:29 +0100 Subject: [PATCH] Introduce `inset-block` usage in the viewer CSS Given that the viewer always set the `dir`-attribute, to either LTR or RTL, we should be able to use this logical CSS property to (very slightly) reduce the size of the CSS; please see https://developer.mozilla.org/en-US/docs/Web/CSS/inset-block --- web/viewer.css | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/web/viewer.css b/web/viewer.css index 8db393ea7..ad3d67c66 100644 --- a/web/viewer.css +++ b/web/viewer.css @@ -258,8 +258,7 @@ body { #sidebarContainer { position: absolute; - top: 32px; - bottom: 0; + inset-block: 32px 0; inset-inline-start: calc(-1 * var(--sidebar-width)); width: var(--sidebar-width); visibility: hidden; @@ -290,8 +289,7 @@ body { } #sidebarContent { - top: 32px; - bottom: 0; + inset-block: 32px 0; inset-inline-start: 0; overflow: auto; position: absolute; @@ -361,8 +359,7 @@ body { #sidebarResizer { position: absolute; - top: 0; - bottom: 0; + inset-block: 0; inset-inline-end: -6px; width: 6px; z-index: 200; @@ -1173,8 +1170,7 @@ a.secondaryToolbarButton[href="#"] { #layersView { position: absolute; width: calc(100% - 8px); - top: 0; - bottom: 0; + inset-block: 0; padding: 4px 4px 0; overflow: auto; user-select: none;