Merge pull request #188 from omnivore-app/fix/ios-darkmode-scrollbar
Fix readerview scrollbars in iOS dark mode
This commit is contained in:
@ -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
|
||||
|
||||
@ -42,6 +42,11 @@ extension WebAppViewCoordinator: WKNavigationDelegate {
|
||||
decisionHandler(.allow)
|
||||
}
|
||||
}
|
||||
|
||||
func webView(_ webView: WKWebView, didFinish _: WKNavigation!) {
|
||||
webView.isOpaque = true
|
||||
webView.backgroundColor = .systemBackground
|
||||
}
|
||||
}
|
||||
|
||||
#if os(iOS)
|
||||
|
||||
@ -2,6 +2,10 @@
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
:root {
|
||||
color-scheme: light dark;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
color: var(--colors-highlightText);
|
||||
background-color: var(--colors-highlightBackground);
|
||||
|
||||
Reference in New Issue
Block a user