4 ms·
> Box-sizing should be border-box by default. Didn't older versions of IE do precisely that, leading to endless frustration? I hate to say it but MS did someth
by mschuster91 11y ago
> Box-sizing should be border-box by default.
Didn't older versions of IE do precisely that, leading to endless frustration? I hate to say it but MS did something right for once.
- audessuscest 11y agoI think you're wrong IE didn't do that
- wereHamster 11y agohttps://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug https://en.wikipedia.org/wiki/Internet_Explorer_box_model_bu... The old IE old model is exactly box-sizing:border-box;
- wvenable 11y agoKind of an interesting history: https://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug https://en.wikipedia.org/wiki/Internet_Explorer_box_model_bu...
- gopowerranger 11y agoNot exactly. The W3C spec stated the box model should work one way and everyone but Microsoft/IE did it that way. This is a new part of the spec which didn't exist back then. However, since IE had 95% market share, everyone marked up their site according to Microsoft's model instead of the W3C. It's affectionately called "quirks mode" and really screwed people up, remnants of which I still see today.
- userbinator 11y agoMS thought the spec was wrong and the W3C actually intended the more logical model, thus following that assumption when they implemented IE; and why the W3C didn't change the spec, or why other browsers didn't follow, is I think more of a political issue.
- olavk 11y agoWell if MS thought they had a better model, they could have proposed it to the W3C and introduced it as -ms-box-model or something. Even if IE's model were superior, it was disastrous to have two contradicting models in different browsers. Maybe whole debacle with 'quirks-mode' could have been avoided.
- gopowerranger 11y agoMany years ago, I read that Microsoft "misinterpreted" the spec but I don't recall the source. Microsoft is a member of the W3C. I don't remember where they were then but, today, they are listed as contributors to writing of the spec and I'd assume they were then, too. The box model has not changed and your statement calling this CSS box model property "more logical" is an opinion. My opinion, as well as many others, is there is nothing wrong with how width/padding/border/margin works. Some complain that width should include all that but, to us, it's perfectly logical the way it is. This new property is only a different way to set the same thing but, again, the model has not changed in any way.
- gsnedders 11y agoIE only reached 95% market share after IE6 had shipped with DOCTYPE switching (i.e., introducing the standards/quirks mode distinction), FWIW.
- JoshTriplett 11y ago> Didn't older versions of IE do precisely that, leading to endless frustration? I hate to say it but MS did something right for once. Regardless of the model you prefer, browsers all need to adhere to the same model; that's the point of standardization. Whether Microsoft thought they had the right model or not, they selected a model that differed from the web standard.
- Camillo 11y agoThey were right on the object-level (they chose the superior layout mode), but wrong on the meta-level (they violated the standards process). At the time, the harm from the meta-level violation far outweighed the object-level improvement, to the point that it led to everyone else in the web design community teaming up against Microsoft and tearing down their dominant position.
- jinushaun 11y agoWhat frustration? The IE box model is the superior model. It's the way graphic designers naturally think about layout: You make a box then fill inward. Easy grid based layout. It's insane to figure out the size of your inner content and grow out—always subtracting from your desired total width.
- olavk 11y agoThe frustration due to IE having one model and the spec and every other browser having a different model. Everyone who worked with CSS in the dark ages of IE6 felt that frustration.
- TabAtkins 11y agoYes, that's the point. ^_^ IE's "'width' sizes the border box" behavior was the better behavior. This was very early in the CSSWG's life, tho, and the group as a whole was less mature, so it didn't value back-compat and supporting actual pages as much. I wasn't around at the time, so I can't be sure of exactly why people preferred the content-box sizing model, but regardless, it was a wrong choice for compat at the time, and in hindsight, it was the wrong choice for the sizing default. There are still reasons to size the content-box, but that's what box-sizing is for (or some equivalent mechanism).