Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Great story. I have yet to think of a valid reason why "box-sizing: border-box" should not be the default. It goes into every CSS document I've ever written.


Then you probably haven't been writing CSS for very long. Its support is quite recent. border-box is a much smarter default, but they'd break a lot of old sites by changing the default behavior.


Correct, only a year or two.


It's funny—back in the day when IE 6's box-model did it more like this (it was really margin-box, which still doesn't exist and probably never will), I used to say that IE's model, while incorrect was superior. And people would disagree with me vehemently. Now, people swear by border-box, which is much more like the old incorrect IE box-model (for good reasons). But it's funny how anti-IE sentiment overruled common sense.


One thing I can think of is when you want your inner content to be a specific width while adjusting the padding and borders to fit the layout.



In old IE it was the default. If you didn't use a proper doctype it would behave that way.

It's fun how history repeats.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: