Skip to content

Instantly share code, notes, and snippets.

@stanosmith
Created June 14, 2018 21:55
Show Gist options
  • Save stanosmith/075b9060624aec0d1b3e2443365d6702 to your computer and use it in GitHub Desktop.
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…
// 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