From 216a8f849d5a2bee788c4e8d4bd85ec9be7e576b Mon Sep 17 00:00:00 2001 From: bmFtZQ Date: Fri, 10 Jun 2022 21:54:47 +0800 Subject: [PATCH] fix titlebar button alignment with mica --- chrome/content/newtab.css | 3 ++- chrome/global/tweaks.css | 21 ++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/chrome/content/newtab.css b/chrome/content/newtab.css index 7f535ec..718a157 100644 --- a/chrome/content/newtab.css +++ b/chrome/content/newtab.css @@ -2,7 +2,8 @@ /* colours */ @-moz-document url-prefix("about:newtab"), url-prefix("about:home") { - body:not([lwt-newtab], [lwt-newtab-brighttext]) { + body:not([lwt-newtab], [lwt-newtab-brighttext]), + body[style*="--newtab-background-color: rgb(249, 249, 251)"] { --newtab-background-color: #F7F7F7 !important; --newtab-background-color-secondary: #fff !important; --newtab-text-primary-color: #252525 !important; diff --git a/chrome/global/tweaks.css b/chrome/global/tweaks.css index 4eb1660..f32e999 100644 --- a/chrome/global/tweaks.css +++ b/chrome/global/tweaks.css @@ -186,9 +186,9 @@ browsing indicator) */ /* line up buttons with duplicate icons from -moz-win-glass */ :root:is(:not(:-moz-lwtheme), - :root[style*="--lwt-accent-color: rgb(240, 240, 244)"], + [style*="--lwt-accent-color: rgb(240, 240, 244)"], [lwt-default-theme-in-dark-mode="true"], - :root[style*="--lwt-accent-color: rgb(28, 27, 34)"] + [style*="--lwt-accent-color: rgb(28, 27, 34)"] ) .titlebar-buttonbox-container { --uc-titlebar-button-size: 30px; --uc-titlebar-size: calc(var(--tab-min-height) + var(--tab-block-margin)); @@ -196,27 +196,26 @@ browsing indicator) */ } :root:is(:not(:-moz-lwtheme), - :root[style*="--lwt-accent-color: rgb(240, 240, 244)"], + [style*="--lwt-accent-color: rgb(240, 240, 244)"], [lwt-default-theme-in-dark-mode="true"], - :root[style*="--lwt-accent-color: rgb(28, 27, 34)"] + [style*="--lwt-accent-color: rgb(28, 27, 34)"] ) .titlebar-button:not(.titlebar-close:hover, :-moz-window-inactive) { list-style-image: none !important; } :root:is(:not(:-moz-lwtheme), - :root[style*="--lwt-accent-color: rgb(240, 240, 244)"], + [style*="--lwt-accent-color: rgb(240, 240, 244)"], [lwt-default-theme-in-dark-mode="true"], - :root[style*="--lwt-accent-color: rgb(28, 27, 34)"] - ) :root:is([inFullscreen], [sizemode="maximized"]) .titlebar-button { + [style*="--lwt-accent-color: rgb(28, 27, 34)"] + ):is([inFullscreen], [sizemode="maximized"]) .titlebar-button { padding-block: 7px 9px !important; } :root:is(:not(:-moz-lwtheme), - :root[style*="--lwt-accent-color: rgb(240, 240, 244)"], + [style*="--lwt-accent-color: rgb(240, 240, 244)"], [lwt-default-theme-in-dark-mode="true"], - :root[style*="--lwt-accent-color: rgb(28, 27, 34)"] - ) :root:is([inFullscreen], [sizemode="maximized"]) .titlebar-close { - padding-block: 7px 9px !important; + [style*="--lwt-accent-color: rgb(28, 27, 34)"] + ):is([inFullscreen], [sizemode="maximized"]) .titlebar-close { padding-right: 19px !important; } }