From eb84de744493373859f6830a9ea34f9bfdc1a561 Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Fri, 12 Nov 2021 00:36:01 +0300 Subject: [PATCH] Enable dark mode in browser UI (#4089) --- beta/src/styles/index.css | 6 ++++++ beta/src/styles/sandpack.css | 2 ++ 2 files changed, 8 insertions(+) diff --git a/beta/src/styles/index.css b/beta/src/styles/index.css index d6268ce8c..ae58fdff1 100644 --- a/beta/src/styles/index.css +++ b/beta/src/styles/index.css @@ -17,10 +17,16 @@ /* Write your own custom base styles here */ html { + color-scheme: light; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-tap-highlight-color: transparent; } + html.dark { + color-scheme: dark; + } + html, body { height: 100%; diff --git a/beta/src/styles/sandpack.css b/beta/src/styles/sandpack.css index d477af585..a6557f55c 100644 --- a/beta/src/styles/sandpack.css +++ b/beta/src/styles/sandpack.css @@ -3,6 +3,8 @@ */ html .sp-wrapper { + color-scheme: inherit; + /* palette */ --sp-colors-fg-active: #24292e !important; --sp-colors-fg-default: #959da5 !important;