Skip to content

Commit 7c875b1

Browse files
gureckisclaude
andcommitted
feat: add dark mode support
Enable dark mode toggling for the theme: - Change colorSchema from "light" to "both" in package.json - Import dark-mode.css with color scheme overrides for all 50+ schemes - Add dark mode styling for inline code elements - Update example.md to use colorSchema: auto Note: Dark mode colors could use some refinement for better aesthetics. Closes #1 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 9097413 commit 7c875b1

5 files changed

Lines changed: 794 additions & 2 deletions

File tree

example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
colorSchema: light
2+
colorSchema: auto
33
layout: cover
44
routerMode: hash
55
title: Base Template

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
},
4545
"homepage": "https://gureckis.github.io/slidev-theme-neversink/",
4646
"slidev": {
47-
"colorSchema": "light",
47+
"colorSchema": "both",
4848
"highlighter": "all"
4949
},
5050
"devDependencies": {

styles/base.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,12 @@ html.dark {
159159
.slidev-layout {
160160
color: #d0d0d0;
161161
}
162+
163+
/* inline code blocks in dark mode */
164+
.slidev-layout :not(pre) > code {
165+
background: #334155; /* slate-700 */
166+
color: #e2e8f0; /* slate-200 */
167+
}
162168
}
163169

164170
html:not(.dark) {

0 commit comments

Comments
 (0)