-
Notifications
You must be signed in to change notification settings - Fork 11
Dark Mode support in HTMLTextView #148
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
Conversation
Everything looks good to me other than the 1 small suggestion above. |
Co-authored-by: David Feinzimer <[email protected]>
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.
Looks good!
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.
Turns out black isn't black, but #1C1C1E, when in DarkMode
Nice find!
…ased on feedback from the team.
@dfeinzimer Based on team feedback, I've removed the round rect border from the text element. |
Latest changes look good. This may be better under it's own issue/PR but I noticed that when switching from one popup to another (without closing the panel in-between), the newly selected popup fails to display. I tried a quick sanity test (showing the latest identify point instead of Any idea? |
@dfeinzimer Thanks. It's an issue with the example and has been reported already. I noticed it a few weeks ago, and fixed it, but I broke it again with recent changes to the example. |
On some devices, the Dark Mode background color is a dark, dark gray, not black. On other devices, it is true black. Need to dynamically insert the dark mode color into the HTML. |
I'm seeing different background colors on the iPhone 13 mini simulator and the iPad Pro 9.7 simulator. I also see the difference in the "example" list (if you look closely, the background of the list doesn't match the background of the rest of the screen): The solution is to make the background of the HTML view transparent. This way it will just expose the view background, whether dark or white. The foreground (text) color will remain black or white. This provides the following interesting effect, if you have a slightly (or greatly) transparent background for the floating panel: |
@dfeinzimer Ok, hopefully one last time. |
This adds dark mode support through CSS elements in the HTML for the TextPopupElement and the HTML view. It also changes the color of the round rect border from
.black
to.primary
, in order to catch light/dark mode changes.Light Mode:
Dark Mode: