From ac2689bcb2681987e4f2c7aa5e3402585887a1e9 Mon Sep 17 00:00:00 2001 From: bmFtZQ <62812711+bmFtZQ@users.noreply.github.com> Date: Sun, 21 Mar 2021 23:07:39 +0800 Subject: [PATCH] add theme support to newtab page --- chrome/userContent/NewTab.css | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/chrome/userContent/NewTab.css b/chrome/userContent/NewTab.css index d5e2e11..101fa8a 100644 --- a/chrome/userContent/NewTab.css +++ b/chrome/userContent/NewTab.css @@ -8,7 +8,6 @@ background-size: 20px !important; } .search-wrapper input { - background-color: var(--search-bg) !important; border: 0 !important; box-shadow: none !important; fill: var(--newtab-search-icon-color); @@ -28,7 +27,6 @@ #searchSubmit { width: 68px !important; background-color: var(--search-button-bg) !important; - fill: #fff !important; } #searchSubmit:hover { background-color: var(--search-button-bg-hover) !important; @@ -36,28 +34,25 @@ .top-site-outer .tile, .screenshot, .top-site-icon { border-radius: 8px !important; } - - .outer-wrapper > main { - position: absolute !important; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - } - body { - background-color: #f5f5f5 !important; - --search-bg: #fff; + body:not([lwt-newtab], [style*="color"]) { + --newtab-background-color: #f5f5f5 !important; + --newtab-text-primary-color: #000 !important; + --newtab-textbox-background-color: #fff !important; + --newtab-topsites-background-color: #fff !important; + --search-button-bg: #0078D4; --search-button-bg-hover: #006CBE; - --word-mark-color: #606060; - - --newtab-topsites-background-color: var(--search-bg) !important; + --newtab-search-icon-color: #fff !important; } - body[lwt-newtab-brighttext] { - background-color: #242424 !important; - --search-bg: #424242; + body[style*="--newtab-background-color:rgba(42, 42, 46, 1); --newtab-text-primary-color:rgba(249, 249, 250, 1);"] { + --newtab-background-color: #242424 !important; + --newtab-text-primary-color: #fff !important; + --newtab-textbox-background-color: #424242 !important; + --newtab-topsites-background-color: #424242 !important; + --search-button-bg: #006CBE; --search-button-bg-hover: #0078D4; - --word-mark-color: #f3f3f3; + --newtab-search-icon-color: #fff !important; } } \ No newline at end of file