From 1a2d8ec365b5adb2d341691a111ab8d8e0c66100 Mon Sep 17 00:00:00 2001 From: doubleZ Date: Mon, 4 Oct 2021 11:34:57 +0800 Subject: [PATCH 1/4] dark mode adaptive for 2 issues Former-commit-id: 5f0a6ea8d9a1cb1b400e56824515460974d19038 --- src/latex-theme.scss | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/latex-theme.scss b/src/latex-theme.scss index ac910da..cfdce71 100644 --- a/src/latex-theme.scss +++ b/src/latex-theme.scss @@ -867,4 +867,27 @@ h6.md-focus:before { span > a { color: #8bb1f9; } + + /* quick open框 (e.g. 插入代码后弹出的语言候选框) */ + .auto-suggest-container { + border: 0px; + background-color: #525C65; + } + + #typora-quick-open { + background-color: #525C65; + } + + #typora-quick-open input{ + background-color: #525C65; + border: 0; + border-bottom: 1px solid grey; + } + + /* 插入图片后弹出的框 */ + .context-menu, + #spell-check-panel, + #footer-word-count-info { + background-color: #42464A; + } } From ae1547a9fca07ab927fa1cb3e0c39641724435e2 Mon Sep 17 00:00:00 2001 From: Ralph Date: Mon, 4 Oct 2021 14:56:34 +0800 Subject: [PATCH 2/4] minor changes to the colours of "quick open" Former-commit-id: 070eb03e5199039626674d97fa8eddd73bfb5ace --- src/latex-theme.scss | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/latex-theme.scss b/src/latex-theme.scss index cfdce71..a62a27d 100644 --- a/src/latex-theme.scss +++ b/src/latex-theme.scss @@ -791,7 +791,7 @@ h6.md-focus:before { /* 树形结构下文件激活边框色 */ /*--side-bar-bg-color: hsl(0, 0%, 10%);*/ /*文件 大纲 侧边栏 背景色*/ - --item-hover-bg-color: hsl(0, 0%, 5%); + --item-hover-bg-color: #373737; /* 打开文文件夹、正文菜单、最近使用 hover 效果 */ --item-hover-text-color: hsl(212, 100%, 75%); --primary-color: hsl(212, 100%, 75%); @@ -871,15 +871,15 @@ h6.md-focus:before { /* quick open框 (e.g. 插入代码后弹出的语言候选框) */ .auto-suggest-container { border: 0px; - background-color: #525C65; + background-color: #282828; } #typora-quick-open { - background-color: #525C65; + background-color: #282828; } #typora-quick-open input{ - background-color: #525C65; + background-color: #282828; border: 0; border-bottom: 1px solid grey; } @@ -888,6 +888,6 @@ h6.md-focus:before { .context-menu, #spell-check-panel, #footer-word-count-info { - background-color: #42464A; + background-color: #282828; } } From dcd5e14ee4d90aa3ff056b01f433999c6f590b83 Mon Sep 17 00:00:00 2001 From: RalXYZ Date: Wed, 6 Oct 2021 03:23:11 +0800 Subject: [PATCH 3/4] change some colours related to #31 Former-commit-id: 4eda4de067e0c1c4a1e20ae1e0e13a4f5b6dd013 --- src/latex-theme.scss | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/latex-theme.scss b/src/latex-theme.scss index a62a27d..5ac22a1 100644 --- a/src/latex-theme.scss +++ b/src/latex-theme.scss @@ -99,7 +99,7 @@ --text-color: #dcdcdc; --select-text-bg-color: #9ab1cf; --select-text-font-color: #161616; - /*--bg-color: hsl(0, 0%, 15%);*/ + --bg-color: hsl(0, 0%, 15%); --mermaid-theme: night; } } @@ -784,7 +784,7 @@ h6.md-focus:before { :root { --blur-text-color: hsla(0, 0%, 90%, 0.2); - --active-file-bg-color: hsl(0, 0%, 5%); + --active-file-bg-color: #373737; /* 文件列表 当前文件激活 背景色*/ --active-file-text-color: hsl(212, 100%, 75%); --active-file-border-color: hsl(212, 100%, 75%); @@ -890,4 +890,15 @@ h6.md-focus:before { #footer-word-count-info { background-color: #282828; } + + /* 退出代码模式的按钮 */ + .typora-sourceview-on #toggle-sourceview-btn { + background: #00000000; /* 设为透明,用于覆盖掉默认的浅色 */ + } + + /* 鼠标悬停到按钮上后的悬停文本框 */ + .ty-tooltip { + background: #282828; + color: #fff; + } } From f097515047143937acdcc40f176b66680ecc1473 Mon Sep 17 00:00:00 2001 From: RalXYZ Date: Wed, 6 Oct 2021 12:30:09 +0800 Subject: [PATCH 4/4] add dark mode compatibility in Unibody UI Former-commit-id: 9da7a02b0437ecf4f0b96cbff961ff6e0b5d6d56 --- src/latex-theme.scss | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/latex-theme.scss b/src/latex-theme.scss index 5ac22a1..bbc83a0 100644 --- a/src/latex-theme.scss +++ b/src/latex-theme.scss @@ -891,9 +891,9 @@ h6.md-focus:before { background-color: #282828; } - /* 退出代码模式的按钮 */ - .typora-sourceview-on #toggle-sourceview-btn { - background: #00000000; /* 设为透明,用于覆盖掉默认的浅色 */ + /* 退出代码模式的按钮,以及最近打开文件页面中的按钮 */ + .typora-sourceview-on #toggle-sourceview-btn, #recent-file-panel-action-btn { + background: #00000000; /* 设为透明,用于覆盖掉默认的浅色 */ } /* 鼠标悬停到按钮上后的悬停文本框 */ @@ -901,4 +901,17 @@ h6.md-focus:before { background: #282828; color: #fff; } + + /* 以下三段与 Unibody UI 模式的适配有关 */ + .megamenu-content, .megamenu-opened header { + background: var(--bg-color); + } + + .megamenu-menu { + background-color: #282828; + } + + #recent-file-panel tbody tr:nth-child(2n-1) { + background-color: #282828; + } }