-
Notifications
You must be signed in to change notification settings - Fork 197
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
Injecting darkmode.css
for Messenger when appropriate
#581
base: main
Are you sure you want to change the base?
Conversation
Added note: The original It seems like most of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello 👋
Thank you for opening this PR!
Nevertheless, we should not be using the prefers dark mode but the internal config for the service in order to inject the dark mode.
window.matchMedia && | ||
window.matchMedia('(prefers-color-scheme: dark)').matches |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not be using this but instead use the internal config of the service for handling dark mode (I'm on mobile right now but should be something like service.isDarkMode)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as @SpecialAro
Pre-flight Checklist
Please ensure you've completed all of the following.
Description of Change
This is mostly a proof of concept.
Currently, none of the services display their dark themes even with the system in dark mode, Ferdium in dark mode, and the universal dark mode feature turned on. It's long bothered me that some recipes have
darkmode.css
files but don't seem to be injected anywhere. So I tested out making some changes towebview.js
, to inject the CSS if it's detected that the system is in dark mode. It seems to work. I am proposing that the previous snippet be added to all recipes if they have adarkmode.css
file.To me, it seems this would solve the dark mode issue (assuming we have a functional
darkmode.css
file). But I do wish to be cautious and see what more senior and knowledgeable contributors think before I proceed.