Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Fixes #556. It appears like the default card actions padding is slightly wrong. The issue affects buttons as well.
This is somehow a possibly minor, but breaking change for existing projects, so I'll try to explain what's going on.
Resources
Cards
According to MD guidelines the card actions padding is 8. The content's padding is 16. Cards use the "compact" buttons with smaller padding - 8 instead of standard 16.
Buttons
The standard horizontal padding is 16. Although it's different for card action buttons. Notice the min-width value, which is 64, but the buttons section doesn't really describe the compact buttons.
Solution
The example provided by @brunohkbx presented a case where it got caught into the min-width trap. The text was too small and caused a larger button padding. If you run this expo snack, it presents the same case, just with different button text. First goes too far to the right, second goes too far to the left.
The first thing to fix was the card actions padding - switch from 4 to 8. It results in:
So it works for the expo examples case, but not really for the mentioned issue. It still gives an extra button padding due to too short text (min-width).
After removing the min-width from compact buttons, it seems like it's finally there:
Finally, it also switches the dialog actions to 8 padding, since that's basically the same thing.
Test plan
https://snack.expo.io/HydBnn5t7
Snapshot tests updated