Skip to content

Fix: theme system doesn't switch to dark #1211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 29, 2025
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
8 changes: 4 additions & 4 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
color-scheme: light;
}

html[data-theme="dark"] {
html[data-theme*="dark"] {
color-scheme: dark;
}

Expand All @@ -23,8 +23,8 @@
scrollbar-color: #778292 #e7ecf2;
scrollbar-width: thin;
}
html[data-theme="dark"],
html[data-theme="dark"] .custom-scrollbar {
html[data-theme*="dark"],
html[data-theme*="dark"] .custom-scrollbar {
scrollbar-color: #8a99ae #313c50;
scrollbar-width: thin;
}
Expand Down Expand Up @@ -133,6 +133,6 @@ html {
--twoslash-cursor: #24292E;
}

html[data-theme="dark"] {
html[data-theme*="dark"] {
--twoslash-cursor: #BABED8;
}
2 changes: 1 addition & 1 deletion src/styles/expressive-code.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ html .expressive-code-overrides .expressive-code .copy button div {
--tmLineBrdCol: hsl(222.77deg 38.21% 51.76% / 55.57%);
}

html[data-theme="dark"]
html[data-theme*="dark"]
.expressive-code-overrides
.expressive-code
.ec-line.mark {
Expand Down
2 changes: 1 addition & 1 deletion tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
"./src/**/*.{js,jsx,ts,tsx,md,mdx}",
"./content/**/*.{js,jsx,ts,tsx,md,mdx}",
],
darkMode: ["selector", "[data-theme='dark']"],
darkMode: ["selector", "[data-theme*='dark']"],
theme: {
fontSize: {
xs: ["0.75rem", { lineHeight: "1rem" }],
Expand Down