Skip to content

Commit 0e54e19

Browse files
committed
refactor: trying another approach
1 parent 7809b07 commit 0e54e19

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/foundations/scss/defaults/default-required.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@
3737
color-scheme: var(--db-color-scheme, light dark);
3838
}
3939
// We need to set the CSS value based on an existing HTML meta tag definition because the previous CSS definition would override that HTML declaration.
40-
body {
41-
&:has([name="color-scheme"][content="light dark"]) {
40+
head {
41+
&:has([name="color-scheme"][content="light dark"]) + body {
4242
--db-color-scheme: light dark;
4343
}
4444

45-
&:has([name="color-scheme"][content="light"]) {
45+
&:has([name="color-scheme"][content="light"]) + body {
4646
--db-color-scheme: light;
4747
}
4848

49-
&:has([name="color-scheme"][content="dark"]) {
49+
&:has([name="color-scheme"][content="dark"]) + body {
5050
--db-color-scheme: dark;
5151
}
5252
}

0 commit comments

Comments
 (0)