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

Add controlSize/controlProminence modifiers #431

Merged
merged 10 commits into from
Jul 19, 2021
Merged

Conversation

carson-katri
Copy link
Member

@carson-katri carson-katri commented Jul 18, 2021

This adds the controlSize and controlProminence modifiers, as well as styles for Button that use them.

Screen Shot 2021-07-17 at 9 54 35 PM

I used the default-button appearance which works in Safari for increased prominence buttons, but this isn't supported in other browsers. I can switch it to use custom CSS, but then it may look out of place with other browser buttons...

@carson-katri carson-katri added DOM/HTML renderer Tokamak in the browser SwiftUI compatibility Tokamak API differences with SwiftUI labels Jul 18, 2021
@MaxDesiatov
Copy link
Collaborator

MaxDesiatov commented Jul 18, 2021

Would it be possible to somehow conditionally use default-button only on Safari and custom CSS in other browsers?

@carson-katri
Copy link
Member Author

I used @supports (-webkit-appearance: default-button) to provide a custom style for browsers that don't support default-button.

Screen Shot 2021-07-18 at 9 52 03 AM

@carson-katri carson-katri requested a review from a team July 19, 2021 17:52
Copy link
Collaborator

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems legit, thanks!

@carson-katri carson-katri merged commit 22ea230 into main Jul 19, 2021
@carson-katri carson-katri deleted the swiftui3-controls branch July 19, 2021 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DOM/HTML renderer Tokamak in the browser SwiftUI compatibility Tokamak API differences with SwiftUI
Development

Successfully merging this pull request may close these issues.

2 participants