diff --git a/apple/OmnivoreKit/Sources/Views/Article/WebAppView.swift b/apple/OmnivoreKit/Sources/Views/Article/WebAppView.swift index 2ab5680ef..f493a9e8f 100644 --- a/apple/OmnivoreKit/Sources/Views/Article/WebAppView.swift +++ b/apple/OmnivoreKit/Sources/Views/Article/WebAppView.swift @@ -33,7 +33,7 @@ public let readerViewNavBarHeight = 50.0 webView.navigationDelegate = context.coordinator webView.isOpaque = false - webView.backgroundColor = UIColor.clear + webView.backgroundColor = .clear webView.configuration.userContentController = contentController webView.scrollView.delegate = context.coordinator webView.scrollView.contentInset.top = readerViewNavBarHeight diff --git a/apple/OmnivoreKit/Sources/Views/Article/WebAppViewCoordinator.swift b/apple/OmnivoreKit/Sources/Views/Article/WebAppViewCoordinator.swift index 7d58582bc..09305f8c3 100644 --- a/apple/OmnivoreKit/Sources/Views/Article/WebAppViewCoordinator.swift +++ b/apple/OmnivoreKit/Sources/Views/Article/WebAppViewCoordinator.swift @@ -42,6 +42,11 @@ extension WebAppViewCoordinator: WKNavigationDelegate { decisionHandler(.allow) } } + + func webView(_ webView: WKWebView, didFinish _: WKNavigation!) { + webView.isOpaque = true + webView.backgroundColor = .systemBackground + } } #if os(iOS) diff --git a/packages/web/styles/articleInnerStyling.css b/packages/web/styles/articleInnerStyling.css index b702b6e69..eda68ae22 100644 --- a/packages/web/styles/articleInnerStyling.css +++ b/packages/web/styles/articleInnerStyling.css @@ -2,6 +2,10 @@ max-width: 100%; } +:root { + color-scheme: light dark; +} + .highlight { color: var(--colors-highlightText); background-color: var(--colors-highlightBackground);