Created
June 14, 2018 21:55
-
-
Save stanosmith/075b9060624aec0d1b3e2443365d6702 to your computer and use it in GitHub Desktop.
This reset gives you more flexibility than its predecessors — you can use content-box or padding-box (where supported) at will, without worrying about a universal selector overriding your CSS. We went into more depth on this technique and the reasoning behind it in "Inheriting box-sizing Probably Slightly Better Best Practice". One potential gri…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Universal Box Sizing with Inheritance | |
// via: https://css-tricks.com/box-sizing/#article-header-id-6 | |
html { | |
box-sizing: border-box; | |
} | |
*, *:before, *:after { | |
box-sizing: inherit; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment