Skip to content

Commit 4e30ce7

Browse files
authored
Fix: theme system doesn't switch to dark (#1211)
1 parent fd9bf17 commit 4e30ce7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/styles.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
color-scheme: light;
1111
}
1212

13-
html[data-theme="dark"] {
13+
html[data-theme*="dark"] {
1414
color-scheme: dark;
1515
}
1616

@@ -23,8 +23,8 @@
2323
scrollbar-color: #778292 #e7ecf2;
2424
scrollbar-width: thin;
2525
}
26-
html[data-theme="dark"],
27-
html[data-theme="dark"] .custom-scrollbar {
26+
html[data-theme*="dark"],
27+
html[data-theme*="dark"] .custom-scrollbar {
2828
scrollbar-color: #8a99ae #313c50;
2929
scrollbar-width: thin;
3030
}
@@ -133,6 +133,6 @@ html {
133133
--twoslash-cursor: #24292E;
134134
}
135135

136-
html[data-theme="dark"] {
136+
html[data-theme*="dark"] {
137137
--twoslash-cursor: #BABED8;
138138
}

src/styles/expressive-code.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ html .expressive-code-overrides .expressive-code .copy button div {
5050
--tmLineBrdCol: hsl(222.77deg 38.21% 51.76% / 55.57%);
5151
}
5252

53-
html[data-theme="dark"]
53+
html[data-theme*="dark"]
5454
.expressive-code-overrides
5555
.expressive-code
5656
.ec-line.mark {

tailwind.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
"./src/**/*.{js,jsx,ts,tsx,md,mdx}",
88
"./content/**/*.{js,jsx,ts,tsx,md,mdx}",
99
],
10-
darkMode: ["selector", "[data-theme='dark']"],
10+
darkMode: ["selector", "[data-theme*='dark']"],
1111
theme: {
1212
fontSize: {
1313
xs: ["0.75rem", { lineHeight: "1rem" }],

0 commit comments

Comments
 (0)