Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt appearance of embedded web views to dark mode #668

Open
mathebox opened this issue Aug 19, 2019 · 0 comments
Open

Adapt appearance of embedded web views to dark mode #668

mathebox opened this issue Aug 19, 2019 · 0 comments

Comments

@mathebox
Copy link
Member

Is your feature request related to a problem? Please describe.
When switching to dark mode, the embedded web view still show light content. This breaks the overall UI.

image

Describe the solution you'd like
Let's try to override the colors of the shown webpage by injecting some javascript code which overrides the colors.

Enable dark color scheme:

:root {
    color-scheme: light dark;
}

Use media query for automatic switching(?):

@media (prefers-color-scheme: dark) {
    // ...
}

Describe alternatives you've considered
Support dark mode platform-wide. But this would require more development resources (https://dev.xikolo.de/youtrack/issue/XI-3961)

Affected Component
WebViewController

Additional context
This does only apply to the course areas pinboard and recap for now.

Some useful links:
https://developer.apple.com/videos/play/wwdc2019/511
https://stackoverflow.com/questions/33123093/insert-css-into-loaded-html-in-uiwebview-wkwebview#33126467

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant