It's to nullify standard distances that are given from HTML standards.
<p>
will, as an example, automatically give a margin above and below, and body
have a padding per standard. As a graphic designer, I curse that and wants to begin from scratch, building elements up from nothing, instead of having to override every single element.
box-sizing
is a little harder to explain, but box-sizing: border-box
should, IMHO, be the standard. It means that padding is counted into the width/height of an element. Normally, if you got width: 100px
and padding: 10px
, the elements width is (100+10+10=) 120 pixels, but with box-sizing: border-box
, the width is 100 pixels. inherit
inherits the same value as the parent element, so if body has, in another declaration, box-sizing: border-box
, all other elements will share the same value, unless otherwise stated.