Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/editor/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ pre code.hljs .hljs-code {
color: oklch(0.25 0.02 260) !important;
}

/* The code-file hover preview is a <div class="hljs">, so the pre code.hljs
rule above misses it. The unscoped .hljs-* token rules below already color
its tokens; this just supplies the matching default text color. */
.light .code-snippet-preview {
color: oklch(0.25 0.02 260) !important;
}

.light .hljs-keyword,
.light .hljs-selector-tag,
.light .hljs-built_in,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/components/InlineMarkdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const CodeSnippetPreview: React.FC<{
<span>{filepath.split('/').pop()}</span>
<span className="opacity-60">{lineEnd && lineEnd !== line ? `lines ${line}–${lineEnd}` : `line ${line}`}</span>
</div>
<div className="hljs overflow-auto text-[12px] leading-5 min-h-0" style={{ padding: 0, background: 'var(--color-muted, #1e293b)' }}>
<div className="hljs code-snippet-preview overflow-auto text-[12px] leading-5 min-h-0" style={{ padding: 0, background: 'var(--code-bg, #1e293b)' }}>
<table className="border-collapse w-full">
<tbody>
{snippet.split('\n').map((_, i) => (
Expand Down