CSS hack: Predictable block elements
coderwall.com
coderwall.com
I've always assumed that they were going by how designers/publishers/typographers traditionally measure things - the "the way it is done" rather than necessarily "the way that is right".
Personally I feel that only counting the content area is right (it sits right in my head), but it is sometimes less convenient in reality because of other limitations of the document and styling models (for example because sometimes know the dimensions of the outer parts as they are inherited from elsewhere). Having the option gives us the best of both worlds, assuming it doesn't get implemented oddly and cause further browser incompatibility issues.
"Border box ftw": http://paulirish.com/2012/box-sizing-border-box-ftw/
Polyfill for supporting IE < 8: https://github.com/Schepp/box-sizing-polyfill
Interesting. The Safari documentation still lists the vendor prefix version, but the browser itself supports "box-sizing" directly, as does Chrome.
* { box-sizing: border-box; }
everywhere...?The biggest downside is that its only supported in IE8+
2. No IE < 8 support
>> You might get up in arms about the universal * selector. Apparently you've heard its slow. Firstly, it's not. It is as fast as h1 as a selector
You need to decide whether your sizing for each element depends on your layout or your content, and choose accordingly. If one way is more useful to you nearly all of the time, then use it that way.
However, also be aware that the star rule is the least performant rule in CSS (http://stackoverflow.com/questions/1714096/why-is-the-css-st...).