Created
February 21, 2014 16:20
-
-
Save MoOx/9137295 to your computer and use it in GitHub Desktop.
I think nowadays you just need this:
button { all: unset; }It starts inheriting all the values like you'd expect, with the exception that:
- it still behaves like
inline-block
- the text is still vertically centered
boss 🤯
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This also removes the default outline from the button when it's focused which makes it completely inaccessible when using keyboard navigation. Be sure to style a custom outline. I tried using
outline: revert
at it seems to work OK in Chrome, Edge, Firefox and Safari, so for modern browsers I suggest keeping these 2 rules always together and use a mixin for that, so no one forgets.