From ed49b42959ed8d612e4e82e124ae34309c70fb4e Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sat, 16 May 2020 09:30:48 -0400 Subject: [PATCH] Minor fine tuning of CSS in new popup panel Hopefully these will address some of the glitches mentioned in the feedback comments: https://github.com/uBlockOrigin/uBlock-issues/issues/1027#issuecomment-629636210 --- src/css/popup-fenix.css | 6 +----- src/css/themes/default.css | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/css/popup-fenix.css b/src/css/popup-fenix.css index 1c8a66947..501e57477 100644 --- a/src/css/popup-fenix.css +++ b/src/css/popup-fenix.css @@ -13,7 +13,6 @@ --popup-gap-extra-thin: calc(0.25 * var(--font-size)); font-size: var(--font-size); line-height: 20px; - width: 100%; } :root body.loading { opacity: 0; @@ -121,9 +120,6 @@ body.needSave #revertRules { .itemRibbon > span { margin-bottom: var(--popup-gap); } -.itemRibbon > [data-i18n] { - min-width: 10em; - } .itemRibbon > [data-i18n] + span { justify-self: end; text-align: end; @@ -511,7 +507,7 @@ body:not([data-more~="e"]) [data-more="e"] { } :root.desktop #main { max-width: 340px; - width: 22em; + width: 21em; } :root:not(.mobile) #switch:hover { background-color: var(--default-surface-hover); diff --git a/src/css/themes/default.css b/src/css/themes/default.css index 6165b6828..759d7abfc 100644 --- a/src/css/themes/default.css +++ b/src/css/themes/default.css @@ -1,4 +1,4 @@ -/* +/** References: https://protocol.mozilla.org/ @@ -185,7 +185,20 @@ --bg-popup-cell-label-mixed: hsla(25, 100%, 50%, 1); } -/* Default dark theme starts here */ +/** + Default dark theme starts here + + Assign a default background color if dark mode is enabled -- hopefully + this will avoid flashes of white background until the document's own CSS + overrides the default color value below. + https://github.com/uBlockOrigin/uBlock-issues/issues/1027#issuecomment-629641072 +*/ + +@media (prefers-color-scheme: dark) { + body { + background-color: var(--dark-gray-90); + } +} :root.dark { }