Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

fix dark editor theme styles

tianma-if8e572d56afee
diff --git a/apps/web/src/components/ui/toggle-group.tsx b/apps/web/src/components/ui/toggle-group.tsx
index 789e8ef0..09e8d0c9 100644
--- a/apps/web/src/components/ui/toggle-group.tsx
+++ b/apps/web/src/components/ui/toggle-group.tsx
@@ -4,7 +4,7 @@ import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "@/lib/utils";
const toggleGroupVariants = cva(
- "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-400/70 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-slate-100 data-[state=on]:text-slate-900",
+ "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-400/70 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-slate-100 data-[state=on]:text-slate-900 dark:data-[state=on]:bg-slate-700 dark:data-[state=on]:text-slate-100",
{
variants: {
variant: {
diff --git a/apps/web/src/styles/editor-themes/base.css b/apps/web/src/styles/editor-themes/base.css
index 32fa33dc..e65c3c9f 100644
--- a/apps/web/src/styles/editor-themes/base.css
+++ b/apps/web/src/styles/editor-themes/base.css
@@ -9,6 +9,10 @@
--editor-theme-accent: #059669;
--editor-theme-soft: #ecfdf5;
--editor-theme-border: #a7f3d0;
+ --editor-theme-code-bg: var(--editor-theme-soft);
+ --editor-theme-code-text: var(--editor-theme-text);
+ --editor-theme-table-stripe: color-mix(in srgb, var(--editor-theme-soft) 52%, var(--editor-theme-bg));
+ --editor-theme-table-hover: color-mix(in srgb, var(--editor-theme-soft) 78%, var(--editor-theme-bg));
background: var(--editor-theme-bg);
}
.edgeever-editor[data-editor-theme]:not([data-editor-theme="default"]) .ProseMirror {
@@ -55,8 +59,8 @@
.edgeever-editor[data-editor-theme]:not([data-editor-theme="default"]) .ProseMirror .edgeever-code-source {
border-color: var(--editor-theme-border);
- background: var(--editor-theme-soft);
- color: var(--editor-theme-text);
+ background: var(--editor-theme-code-bg);
+ color: var(--editor-theme-code-text);
}
.edgeever-editor[data-editor-theme]:not([data-editor-theme="default"]) .ProseMirror th {
@@ -130,9 +134,20 @@
border-color: var(--editor-theme-border);
border-radius: var(--editor-theme-radius, 6px);
+ background: var(--editor-theme-bg);
box-shadow: var(--editor-theme-shadow, none);
}
+.edgeever-editor[data-editor-theme]:not([data-editor-theme="default"]) .ProseMirror tbody tr:nth-child(even) td {
+
+ background: var(--editor-theme-table-stripe);
+}
+
+.edgeever-editor[data-editor-theme]:not([data-editor-theme="default"]) .ProseMirror tbody tr:hover td {
+
+ background: var(--editor-theme-table-hover);
+}
+
.edgeever-editor .ProseMirror .edgeever-theme-block {
position: relative;
diff --git a/apps/web/src/styles/editor-themes/minimal-emerald.css b/apps/web/src/styles/editor-themes/minimal-emerald.css
index fe4805ba..7be160e2 100644
--- a/apps/web/src/styles/editor-themes/minimal-emerald.css
+++ b/apps/web/src/styles/editor-themes/minimal-emerald.css
@@ -8,10 +8,24 @@
--editor-theme-accent: #059669;
--editor-theme-soft: #f8fafc;
--editor-theme-border: #e2e8f0;
+ --editor-theme-code-bg: #f1f5f9;
+ --editor-theme-code-text: #059669;
--editor-theme-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
--editor-theme-radius: 6px;
}
+:root.dark .edgeever-editor[data-editor-theme="minimal-emerald"]:not([data-editor-theme="default"]) {
+ --editor-theme-bg: #111827;
+ --editor-theme-text: #d1d5db;
+ --editor-theme-muted: #9ca3af;
+ --editor-theme-heading: #f9fafb;
+ --editor-theme-accent: #34d399;
+ --editor-theme-soft: #1f2937;
+ --editor-theme-border: #374151;
+ --editor-theme-code-bg: #1f2937;
+ --editor-theme-code-text: #6ee7b7;
+}
+
.edgeever-editor[data-editor-theme="minimal-emerald"]:not([data-editor-theme="default"]) .ProseMirror {
font-size: 1rem;
line-height: 1.75;
@@ -60,7 +74,7 @@
}
.edgeever-editor[data-editor-theme="minimal-emerald"]:not([data-editor-theme="default"]) .ProseMirror strong {
- color: #171717;
+ color: var(--editor-theme-heading);
font-weight: 600;
}
@@ -76,7 +90,7 @@
border-left: 3px solid var(--editor-theme-accent);
border-radius: 0;
background: var(--editor-theme-soft);
- color: #374151;
+ color: var(--editor-theme-muted);
padding: 0.6rem 1rem;
}
@@ -97,10 +111,10 @@
}
.edgeever-editor[data-editor-theme="minimal-emerald"]:not([data-editor-theme="default"]) .ProseMirror code {
- border: 1px solid #e2e8f0;
+ border: 1px solid var(--editor-theme-border);
border-radius: 4px;
- background: #f1f5f9;
- color: #059669;
+ background: var(--editor-theme-code-bg);
+ color: var(--editor-theme-code-text);
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
font-size: 0.875rem;
padding: 0.15rem 0.35rem;
@@ -109,26 +123,26 @@
.edgeever-editor[data-editor-theme="minimal-emerald"]:not([data-editor-theme="default"]) .ProseMirror pre {
border: 1px solid var(--editor-theme-border);
border-radius: 6px;
- background: #f8fafc;
- color: #1e293b;
+ background: var(--editor-theme-code-bg);
+ color: var(--editor-theme-code-text);
padding: 0.75rem 1rem;
}
.edgeever-editor[data-editor-theme="minimal-emerald"]:not([data-editor-theme="default"]) .ProseMirror hr {
height: 1px;
border: 0;
- background: #e2e8f0;
+ background: var(--editor-theme-border);
margin: 1.75rem 0;
}
.edgeever-editor[data-editor-theme="minimal-emerald"]:not([data-editor-theme="default"]) .ProseMirror th {
- background: #f8fafc;
+ background: var(--editor-theme-soft);
color: var(--editor-theme-heading);
font-weight: 600;
}
.edgeever-editor[data-editor-theme="minimal-emerald"]:not([data-editor-theme="default"]) .ProseMirror .edgeever-theme-block {
- --theme-block-bg: #f8fafc;
- --theme-block-border: #e2e8f0;
+ --theme-block-bg: var(--editor-theme-soft);
+ --theme-block-border: var(--editor-theme-border);
border-radius: 6px;
}
diff --git a/apps/web/src/styles/editor-themes/outline-emerald.css b/apps/web/src/styles/editor-themes/outline-emerald.css
index 79959ea3..43b4a252 100644
--- a/apps/web/src/styles/editor-themes/outline-emerald.css
+++ b/apps/web/src/styles/editor-themes/outline-emerald.css
@@ -8,10 +8,24 @@
--editor-theme-accent: #059669;
--editor-theme-soft: #f8fafc;
--editor-theme-border: #e2e8f0;
+ --editor-theme-code-bg: #0f172a;
+ --editor-theme-code-text: #f8fafc;
--editor-theme-font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", sans-serif;
--editor-theme-radius: 8px;
}
+:root.dark .edgeever-editor[data-editor-theme="outline-emerald"]:not([data-editor-theme="default"]) {
+ --editor-theme-bg: #0f172a;
+ --editor-theme-text: #cbd5e1;
+ --editor-theme-muted: #94a3b8;
+ --editor-theme-heading: #f8fafc;
+ --editor-theme-accent: #34d399;
+ --editor-theme-soft: #1e293b;
+ --editor-theme-border: #334155;
+ --editor-theme-code-bg: #020617;
+ --editor-theme-code-text: #e2e8f0;
+}
+
.edgeever-editor[data-editor-theme="outline-emerald"]:not([data-editor-theme="default"]) .ProseMirror {
font-size: 1rem;
line-height: 1.7;
@@ -62,7 +76,7 @@
}
.edgeever-editor[data-editor-theme="outline-emerald"]:not([data-editor-theme="default"]) .ProseMirror strong {
- color: #0f172a;
+ color: var(--editor-theme-heading);
font-weight: 600;
}
@@ -75,10 +89,10 @@
.edgeever-editor[data-editor-theme="outline-emerald"]:not([data-editor-theme="default"]) .ProseMirror blockquote {
margin: 1rem 0;
- border-left: 3px solid #cbd5e1;
+ border-left: 3px solid var(--editor-theme-border);
border-radius: 0;
background: var(--editor-theme-soft);
- color: #475569;
+ color: var(--editor-theme-muted);
padding: 0.6rem 1rem;
}
@@ -99,38 +113,38 @@
}
.edgeever-editor[data-editor-theme="outline-emerald"]:not([data-editor-theme="default"]) .ProseMirror code {
- border: 1px solid #e2e8f0;
+ border: 1px solid var(--editor-theme-border);
border-radius: 4px;
- background: #f1f5f9;
- color: #0f172a;
+ background: var(--editor-theme-soft);
+ color: var(--editor-theme-text);
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
font-size: 0.875rem;
padding: 0.15rem 0.35rem;
}
.edgeever-editor[data-editor-theme="outline-emerald"]:not([data-editor-theme="default"]) .ProseMirror pre {
- border: 1px solid #cbd5e1;
+ border: 1px solid var(--editor-theme-border);
border-radius: 8px;
- background: #0f172a;
- color: #f8fafc;
+ background: var(--editor-theme-code-bg);
+ color: var(--editor-theme-code-text);
padding: 0.85rem 1.1rem;
}
.edgeever-editor[data-editor-theme="outline-emerald"]:not([data-editor-theme="default"]) .ProseMirror hr {
height: 1px;
border: 0;
- background: #e2e8f0;
+ background: var(--editor-theme-border);
margin: 1.75rem 0;
}
.edgeever-editor[data-editor-theme="outline-emerald"]:not([data-editor-theme="default"]) .ProseMirror th {
- background: #f8fafc;
+ background: var(--editor-theme-soft);
color: var(--editor-theme-heading);
font-weight: 600;
}
.edgeever-editor[data-editor-theme="outline-emerald"]:not([data-editor-theme="default"]) .ProseMirror .edgeever-theme-block {
- --theme-block-bg: #f8fafc;
- --theme-block-border: #e2e8f0;
+ --theme-block-bg: var(--editor-theme-soft);
+ --theme-block-border: var(--editor-theme-border);
border-radius: 8px;
}