-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
Add default dark styles for Views #241
Conversation
Let me know if any of the designs/colors need to be tweaked. |
Chrome and Firefox have these blue underlines for |
I've already fixed the NavigationLink color, as well as the |
I remember that being an issue in Chrome. I think they’re planning to have custom (non-native-looking) default form controls which would probably support dark mode. |
Ok, I've got the SidebarListStyle rendering the What are your opinions on Chrome styling. Do we write in default dark mode styles? |
Generated by 🚫 Danger Swift against c0a5806 |
Oh, I also had to modify the LayoutModifier to check for an infinite frame. That is: .frame(minWidth: 0, maxWidth: .infinity)
.frame(minHeight: 0, maxHeight: .infinity) Will always fill it’s parent on the respective axis. |
Great to see you have selected link highlighting working! I’ve noticed a bug in Safari: when you load the demo, click on a section in a sidebar, switch to a different tab, then come back, the content of the |
Maybe its related to the context now being an |
No, I haven't been able to reproduce that.. |
The |
I fixed the color thing by putting the string directly as the innerHTML instead of putting a span inside, but I can't figure why you have to press the edge of the button. I thought the span may have been causing it, but it wasn't that. Any ideas? |
Also is it only happening in Safari betas? If so, it may be their bug. |
I only see it happening in Safari but I also only happen to have beta versions of Safari installed right now so I can’t check the shipping version. I can try to report it though! I did a quick test of a button with a span inside it, essentially copying the HTML of the Tokamak |
I tested on Catalina and got the same issue with the buttons. |
Ok, I fixed it by disabling: "pointerdown": { _ in isPressed = true },
"pointerup": { _ in isPressed = false }, These events are not supported in Safari. Is there another way to get this information? |
I guess these could be |
MDN says that the pointer events spec is obsolete, I thought it was the recent one 🤔 https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/pointerdown_event |
|
Pointer events are supported in Safari 13. It looks like there’s a version 2 of the spec which is why the old one is obsolete. |
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.
Thank you 🙌
Two issues in this branch in Safari that I can’t reproduce on
|
I can't replicate 1, but fixed 2. |
Same, I wasn't able to replicate 1 on my side |
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.
LGTM! Opened #256 for the first issue as it’s unrelated.
This provides dark mode styles for the background and many elements, such as
Text
,Button
,TextField
, etc.Resolves #237.