Skip to content
Open
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
13 changes: 13 additions & 0 deletions apps/app/src/app/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,19 @@ select:disabled {
--sidebar-ring: var(--slate-8);
}

/* Shiki emits both palettes as CSS variables (themes option in markdown.tsx);
swap token colors to the dark palette when the app theme is dark. */
.dark .shiki,
.dark .shiki span,
[data-theme="dark"] .shiki,
[data-theme="dark"] .shiki span {
color: var(--shiki-dark) !important;
background-color: var(--shiki-dark-bg) !important;
font-style: var(--shiki-dark-font-style) !important;
font-weight: var(--shiki-dark-font-weight) !important;
text-decoration: var(--shiki-dark-text-decoration) !important;
}

@theme inline {
--font-sans: 'Geist Variable', sans-serif;
--font-heading: 'IBM Plex Sans Variable', sans-serif;
Expand Down
3 changes: 2 additions & 1 deletion apps/app/src/components/markdown/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ const highlightedMarkdownParser = new Marked({
return codeToHtml(code, {
lang: language,
meta: { __raw: props.join(" ") },
theme: "github-light",
themes: { light: "github-light", dark: "github-dark" },
defaultColor: "light",
transformers: [
transformerNotationDiff({ matchAlgorithm: "v3" }),
transformerNotationHighlight({ matchAlgorithm: "v3" }),
Expand Down
3 changes: 2 additions & 1 deletion apps/app/src/react-app/domains/session/surface/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ const highlightedMarkdownParser = new Marked<string, string>({
return codeToHtml(code, {
lang: language,
meta: { __raw: props.join(" ") },
theme: "github-light",
themes: { light: "github-light", dark: "github-dark" },
defaultColor: "light",
transformers: [
transformerNotationDiff({ matchAlgorithm: "v3" }),
transformerNotationHighlight({ matchAlgorithm: "v3" }),
Expand Down