From f9262d29fce0ceff14d3b9e183aebcda440de371 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Mon, 25 Apr 2022 14:15:59 +0200 Subject: [PATCH] Clean-up some CSS rules for the various toolbar separators This re-factors the various toolbar separators to *explicitly* specify both their dimensions and margins. Also, for the `horizontalToolbarSeparator`-class we can just set the `background-color` rather than using `border-top`. Note that the `splitToolbarButtonSeparator`-class currently sets a number of unnecessary CSS rules, since as mentioned by the Firefox Devtools both the `display`- and `z-index`-properties are being ignored because `float` is used. Finally, there's also no need to set a `z-index` for some of the `:hover`-rules. It's possible that this *was* necessary before the re-design, since the buttons had borders then. --- web/viewer.css | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/web/viewer.css b/web/viewer.css index d3f9b3ed9..094845b79 100644 --- a/web/viewer.css +++ b/web/viewer.css @@ -629,7 +629,6 @@ select { .toolbarButton.textButton:hover, .toolbarButton.textButton:focus-visible { background-color: var(--button-hover-color); - z-index: 199; } .splitToolbarButton > .toolbarButton { position: relative; @@ -641,12 +640,10 @@ select { .splitToolbarButtonSeparator { float: inline-start; - padding: 10px 0; - width: 1px; - background-color: var(--separator-color); - z-index: 99; - display: inline-block; margin: 4px 0; + width: 1px; + height: 20px; + background-color: var(--separator-color); } .toolbarButton, @@ -961,18 +958,17 @@ select { .verticalToolbarSeparator { display: block; - padding: 11px 0; margin: 5px 2px; width: 1px; + height: 22px; background-color: var(--separator-color); } - .horizontalToolbarSeparator { display: block; - margin: 6px 0 5px; + margin: 6px 0; height: 1px; width: 100%; - border-top: 1px solid var(--doorhanger-separator-color); + background-color: var(--doorhanger-separator-color); } .toolbarField {