Revert trying to reset Chrome 62 default button styles #216
+8
−10
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.
Resolves #215.
In Chrome 62, a user agent stylesheet change was made on macOS that gave all button-ish elements a 4px border radius. This is annoying.
Other discussions:
necolas/normalize.css#706
primer/css#388
twbs/bootstrap#24093
We tried to "fix" this by taking all of the selectors Chrome was targeting:
...and undoing the border reset.
The issue is some of these selectors have a higher specificity than a single class would, meaning for things like
<input type="button">
, ourrounded
utilities don't have any effect.It turns out Chrome has now reverted this change:
https://bugs.chromium.org/p/chromium/issues/detail?id=752450#c13
...so it will stop being a problem in Chrome 63.
As such, we've opted to not attempt to "fix" this at all, because even though we could reset it for single selectors like
button
, we can't targetinput[type="button"]
without breaking our own utilities.Instead, it's recommended that users explicitly add
rounded-none
to buttons that should have square corners until Chrome 62 is no longer in widespread usage.We may revisit "fixing" this in another patch release if we can think of an easy fix that doesn't introduce specificity issues, but reverting it for now so we can tag 0.2.1 and get our
rounded
utilities working again on<input type="{button|reset|submit}">
elements.