Skip to content

Commit 12cf365

Browse files
committed
fix: complete dark mode coverage for editor, settings, and graph
- Add dark mode syntax highlighting colors for code blocks (hljs tokens) - Add dark mode callout block backgrounds (blue, green, yellow, red, purple) - Add dark mode styles for settings file browser meta text and breadcrumbs - Fix knowledge graph D3 inline colors to be theme-aware (link strokes, node borders, label text) https://claude.ai/code/session_01QddASAFJgFoPPTDS88nkq2
1 parent 2f65d19 commit 12cf365

3 files changed

Lines changed: 32 additions & 3 deletions

File tree

packages/ui/src/components/editor/editor-styles.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,3 +977,26 @@
977977
.dark .cept-folder-view-count { color: #71717a; background: #333; }
978978
.dark .cept-editor .drag-handle::after { color: #4a4a4a; }
979979
.dark .cept-editor .drag-handle:hover::after { color: #71717a; }
980+
981+
/* Dark mode syntax highlighting */
982+
.dark .cept-editor .tiptap pre code .hljs-comment,
983+
.dark .cept-editor .tiptap pre code .hljs-quote { color: #6b7280; }
984+
.dark .cept-editor .tiptap pre code .hljs-keyword,
985+
.dark .cept-editor .tiptap pre code .hljs-selector-tag { color: #c084fc; }
986+
.dark .cept-editor .tiptap pre code .hljs-string,
987+
.dark .cept-editor .tiptap pre code .hljs-addition { color: #86efac; }
988+
.dark .cept-editor .tiptap pre code .hljs-number,
989+
.dark .cept-editor .tiptap pre code .hljs-literal { color: #fb923c; }
990+
.dark .cept-editor .tiptap pre code .hljs-built_in,
991+
.dark .cept-editor .tiptap pre code .hljs-type { color: #fde047; }
992+
.dark .cept-editor .tiptap pre code .hljs-title,
993+
.dark .cept-editor .tiptap pre code .hljs-section { color: #93c5fd; }
994+
.dark .cept-editor .tiptap pre code .hljs-deletion { color: #fca5a5; }
995+
996+
/* Dark mode callout blocks */
997+
.dark .cept-editor .tiptap div.cept-callout { background-color: rgba(255, 255, 255, 0.05); }
998+
.dark .cept-editor .tiptap div.cept-callout[data-color="blue"] { background-color: rgba(59, 130, 246, 0.15); }
999+
.dark .cept-editor .tiptap div.cept-callout[data-color="green"] { background-color: rgba(34, 197, 94, 0.15); }
1000+
.dark .cept-editor .tiptap div.cept-callout[data-color="yellow"] { background-color: rgba(234, 179, 8, 0.15); }
1001+
.dark .cept-editor .tiptap div.cept-callout[data-color="red"] { background-color: rgba(239, 68, 68, 0.15); }
1002+
.dark .cept-editor .tiptap div.cept-callout[data-color="purple"] { background-color: rgba(168, 85, 247, 0.15); }

packages/ui/src/components/knowledge-graph/KnowledgeGraph.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ export function KnowledgeGraph({
6969
.data(displayData.links)
7070
.join('line')
7171
.attr('class', 'cept-graph-link')
72-
.attr('stroke', (d: GraphLink) => d.type === 'parent' ? '#d1d5db' : '#93c5fd')
72+
.attr('stroke', (d: GraphLink) => {
73+
const isDark = document.documentElement.classList.contains('dark');
74+
return d.type === 'parent' ? (isDark ? '#525252' : '#d1d5db') : (isDark ? '#60a5fa' : '#93c5fd');
75+
})
7376
.attr('stroke-width', 1.5)
7477
.attr('stroke-dasharray', (d: GraphLink) => d.type === 'mention' ? '4,4' : 'none');
7578

@@ -93,15 +96,15 @@ export function KnowledgeGraph({
9396
if (d.group && colorGroups[d.group]) return colorGroups[d.group];
9497
return colorGroups['default'] ?? '#6366f1';
9598
})
96-
.attr('stroke', '#fff')
99+
.attr('stroke', document.documentElement.classList.contains('dark') ? '#1e1e1e' : '#fff')
97100
.attr('stroke-width', 2);
98101

99102
if (showLabels) {
100103
node.append('text')
101104
.attr('dx', 12)
102105
.attr('dy', 4)
103106
.attr('font-size', '11px')
104-
.attr('fill', '#374151')
107+
.attr('fill', document.documentElement.classList.contains('dark') ? '#d4d4d8' : '#374151')
105108
.text((d: GraphNode) => d.title);
106109
}
107110

packages/ui/src/components/settings/settings-styles.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,6 +1252,9 @@
12521252
.dark .cept-fb-preview-header { background: #262626; border-color: #333; }
12531253
.dark .cept-fb-preview-name { color: #e5e5e5; }
12541254
.dark .cept-fb-preview-content { color: #d4d4d8; }
1255+
.dark .cept-fb-preview-meta { color: #71717a; }
1256+
.dark .cept-fb-breadcrumb-link { color: #a1a1aa; }
1257+
.dark .cept-fb-breadcrumb-link:hover { color: #d4d4d8; }
12551258

12561259
/* Clone overlay */
12571260
.cept-clone-overlay {

0 commit comments

Comments
 (0)