add theme support to newtab page

This commit is contained in:
bmFtZQ 2021-03-21 23:07:39 +08:00 committed by GitHub
parent 96da48a617
commit ac2689bcb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,6 @@
background-size: 20px !important; background-size: 20px !important;
} }
.search-wrapper input { .search-wrapper input {
background-color: var(--search-bg) !important;
border: 0 !important; border: 0 !important;
box-shadow: none !important; box-shadow: none !important;
fill: var(--newtab-search-icon-color); fill: var(--newtab-search-icon-color);
@ -28,7 +27,6 @@
#searchSubmit { #searchSubmit {
width: 68px !important; width: 68px !important;
background-color: var(--search-button-bg) !important; background-color: var(--search-button-bg) !important;
fill: #fff !important;
} }
#searchSubmit:hover { #searchSubmit:hover {
background-color: var(--search-button-bg-hover) !important; background-color: var(--search-button-bg-hover) !important;
@ -36,28 +34,25 @@
.top-site-outer .tile, .screenshot, .top-site-icon { .top-site-outer .tile, .screenshot, .top-site-icon {
border-radius: 8px !important; border-radius: 8px !important;
} }
.outer-wrapper > main {
position: absolute !important;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
body { body:not([lwt-newtab], [style*="color"]) {
background-color: #f5f5f5 !important; --newtab-background-color: #f5f5f5 !important;
--search-bg: #fff; --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: #0078D4;
--search-button-bg-hover: #006CBE; --search-button-bg-hover: #006CBE;
--word-mark-color: #606060; --newtab-search-icon-color: #fff !important;
--newtab-topsites-background-color: var(--search-bg) !important;
} }
body[lwt-newtab-brighttext] { body[style*="--newtab-background-color:rgba(42, 42, 46, 1); --newtab-text-primary-color:rgba(249, 249, 250, 1);"] {
background-color: #242424 !important; --newtab-background-color: #242424 !important;
--search-bg: #424242; --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: #006CBE;
--search-button-bg-hover: #0078D4; --search-button-bg-hover: #0078D4;
--word-mark-color: #f3f3f3; --newtab-search-icon-color: #fff !important;
} }
} }