From 80cbe131677d823f0b31b8634bd7cabfdde3c6f2 Mon Sep 17 00:00:00 2001 From: Thomas Steiner Date: Thu, 20 Aug 2020 13:20:13 +0200 Subject: [PATCH] Make iOS "safe area" respect dark mode (#2053) --- src/components/App.tsx | 2 +- src/css/theme.scss | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index 0b0d983c..c7fbf96a 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -724,7 +724,7 @@ class App extends React.Component { }); } - document.body.classList.toggle( + document.documentElement.classList.toggle( "Appearance_dark", this.state.appearance === "dark", ); diff --git a/src/css/theme.scss b/src/css/theme.scss index a7e400a5..30551225 100644 --- a/src/css/theme.scss +++ b/src/css/theme.scss @@ -37,6 +37,10 @@ --popup-text-inverted-color: #{$oc-white}; } +:root.Appearance_dark { + background-color: #000; +} + .Appearance_dark { --text-color-primary: #{$oc-gray-4}; --bg-color-island: #1e1e1e;