Skip to content

Commit eb84de7

Browse files
authored
Enable dark mode in browser UI (#4089)
1 parent 719aa3c commit eb84de7

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

beta/src/styles/index.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,16 @@
1717

1818
/* Write your own custom base styles here */
1919
html {
20+
color-scheme: light;
21+
2022
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
2123
-webkit-tap-highlight-color: transparent;
2224
}
2325

26+
html.dark {
27+
color-scheme: dark;
28+
}
29+
2430
html,
2531
body {
2632
height: 100%;

beta/src/styles/sandpack.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
*/
44

55
html .sp-wrapper {
6+
color-scheme: inherit;
7+
68
/* palette */
79
--sp-colors-fg-active: #24292e !important;
810
--sp-colors-fg-default: #959da5 !important;

0 commit comments

Comments
 (0)