Skip to content

Instantly share code, notes, and snippets.

@geraldyeo
Created September 20, 2016 09:42
Show Gist options
  • Save geraldyeo/f80fb3b52d0aa8897b3a6fef64d384bc to your computer and use it in GitHub Desktop.
Save geraldyeo/f80fb3b52d0aa8897b3a6fef64d384bc to your computer and use it in GitHub Desktop.
Inheriting box-sizing as best practice
/*
* This will give you the same result, and make
* it easier to change the box-sizing in plugins
* or other components that leverage other behavior.
* @see https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
*/
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