From d4bbdb0a4cdb4d7b689a9368a0c4227609f332f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20N=C4=9Bmec?= Date: Tue, 24 Jan 2023 19:49:28 +0100 Subject: [PATCH] Dark theme (couldn't get prefers-color-scheme: dark to work) Cf. https://github.com/brookhong/Surfingkeys/pull/1898 (Support light and dark color scheme) --- src/conf.js | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 2 deletions(-) diff --git a/src/conf.js b/src/conf.js index de1b916..5be878c 100644 --- a/src/conf.js +++ b/src/conf.js @@ -1,4 +1,4 @@ -import theme from "./theme.js" +// import theme from "./theme.js" import keys from "./keys.js" import searchEngines from "./search-engines.js" @@ -15,7 +15,82 @@ export default { // this is needed, --disable-smooth-scrolling doesn't suffice smoothScroll: false, tabsMRUOrder: false, - theme, + theme: ` + body { + // font-family: "DejaVu Sans", DejaVu, Arial, sans-serif; + font-size: 10pt; + color: #d7b0ff; + } + + .sk_theme { + background: #000; + color: #d7b0ff; + } + + .sk_theme .annotation { + color: #d7b0ff; + } + + .sk_theme .input { + color: #d7b0ff; + } + + #sk_omnibar { + background: #2a323e !important; + background-color: #2a323e; + color: #d7b0ff; + } + + #sk_omnibar .prompt { + color: #d7b0ff !important; + } + + #sk_omnibar input { + color: #d7b0ff !important; + } + + #sk_omnibarSearchResult { + background: #2a323e !important; + } + + #sk_omnibarSearchResult > ul > li:nth-child(2n+1) { + background: #222 !important; + } + + #sk_omnibarSearchResult .url { + color: #d7b0ff !important; + } + + #sk_omnibar li.focused, #sk_omnibarSearchResult > ul > li.focused { + background: #181d24 !important; + color: #d7b0ff !important; + } + + #sk_banner, + #sk_keystroke { + border: 1px solid #d7b0ff; + background: #000; + } + + #sk_keystroke kbd { + color: #ddd; + background: #000; + border: 1px solid #2d0080; + box-shadow: none; + } + + #sk_keystroke kbd .candidates { + color: #ff8cf8; + } + + /* Disable RichHints CSS animation */ + .expandRichHints { + animation: 0s ease-in-out 1 forwards expandRichHints; + } + .collapseRichHints { + animation: 0s ease-in-out 1 forwards collapseRichHints; + } + `, }, keys,