Merge pull request #188 from omnivore-app/fix/ios-darkmode-scrollbar

Fix readerview scrollbars in iOS dark mode
This commit is contained in:
Jackson Harper
2022-03-07 09:27:49 -08:00
committed by GitHub
3 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -42,6 +42,11 @@ extension WebAppViewCoordinator: WKNavigationDelegate {
decisionHandler(.allow)
}
}
func webView(_ webView: WKWebView, didFinish _: WKNavigation!) {
webView.isOpaque = true
webView.backgroundColor = .systemBackground
}
}
#if os(iOS)

View File

@ -2,6 +2,10 @@
max-width: 100%;
}
:root {
color-scheme: light dark;
}
.highlight {
color: var(--colors-highlightText);
background-color: var(--colors-highlightBackground);