From 6ff68aaa74497a5c9f04c72daf704541e0bbb37e Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 21 Feb 2022 02:24:34 +0300 Subject: [PATCH] simplify conditional css in popup --- popup.html | 12 +++++++----- popup/popup.css | 28 ++++++++-------------------- 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/popup.html b/popup.html index bded0f35..18096b63 100644 --- a/popup.html +++ b/popup.html @@ -196,7 +196,7 @@ -
+
@@ -206,9 +206,9 @@
+ >
-
+
- +
diff --git a/popup/popup.css b/popup/popup.css index 63a9be1b..8b690a32 100644 --- a/popup/popup.css +++ b/popup/popup.css @@ -27,8 +27,11 @@ body > div:not(#installed):not(#message-box):not(.colorpicker-popup) { padding-right: var(--outer-padding); } +body:not(.blocked) .if-blocked, +.blocked .if-not-blocked, +.blocked #installed > :not(.frame), .firefox .chromium-only { - display: none; + display: none !important; } #main-actions { @@ -439,12 +442,6 @@ a:hover .svg-icon { fill: var(--fg); } -body.blocked #popup-manage-button + .split-btn-pedal, -body.blocked #installed > :not(.frame), -body.blocked #main-actions > :not(#disableAll-label) { - display: none; -} - /* Never shown, but can be enabled with a style */ .entry .actions > .enable, @@ -601,9 +598,11 @@ body.blocked #main-actions > :not(#disableAll-label) { /* action buttons */ #popup-options { + --btn-gap: 4px; display: flex; flex-direction: row; padding: var(--outer-padding) 1px; + margin-right: calc(-1 * var(--btn-gap)); } #popup-options .split-btn > :first-child { width: calc(100% - 16px); @@ -617,8 +616,8 @@ body.blocked #main-actions > :not(#disableAll-label) { text-overflow: ellipsis; padding: 2px 4px; } -#popup-options > :nth-last-child(n + 2) { - margin-right: 4px; +#popup-options > * { + margin-right: var(--btn-gap); } #popup-options > *, #popup-options .split-btn > :first-child { @@ -626,17 +625,6 @@ body.blocked #main-actions > :not(#disableAll-label) { flex: 1 1 auto; min-width: 2em; } -.blocked #find-split, -.blocked #options-btn svg, -body:not(.blocked) #popup-options a[href*="wiki"] { - display: none; -} -#options-btn::after { - content: '\A0'; -} -.blocked #options-btn::after { - content: attr(title); -} #options-btn svg { left: 0; right: 0;