3 ms·
It's not a matter of opinion, content-box is much more difficult to work with when using fluid layouts than border-box which is why all major CSS frameworks use
by wvenable 8y ago
It's not a matter of opinion, content-box is much more difficult to work with when using fluid layouts than border-box which is why all major CSS frameworks use border-box now.
At the time, the CSS specification didn't make it clear which way to calculate widths so Microsoft, probably due to their experience building graphical layout software, chose border-box while all other rendering engines at the time went content-box probably without considering the consequences. Realizing the error, the box-sizing property was added to CSS to fix this.
- austincheney 8y agoYou claim it’s not a matter of opinion and due to personal opinion. Weird. Then you invent a history from which to draw imaginary conclusions. It is perfectly ok to have a personal opinion on CSS. You don’t have to justify it and you certainly don’t have to conjure a dillisional alternate reality. Imagination aside, IE3 was the first browser to offer any CSS support.
- deleted 8y ago[deleted]
- wvenable 8y agohttps://css-tricks.com/box-sizing/ https://css-tricks.com/box-sizing/ https://blog.teamtreehouse.com/box-sizing-secret-simple-css-layouts https://blog.teamtreehouse.com/box-sizing-secret-simple-css-... https://quirksmode.org/css/user-interface/boxsizing.html https://quirksmode.org/css/user-interface/boxsizing.html https://www.jefftk.com/p/the-revenge-of-the-ie-box-model https://www.jefftk.com/p/the-revenge-of-the-ie-box-model https://github.com/twbs/bootstrap/issues/12351 https://github.com/twbs/bootstrap/issues/12351 https://jgthms.com/minireset.css/ https://jgthms.com/minireset.css/ https://github.com/sindresorhus/modern-normalize https://github.com/sindresorhus/modern-normalize https://semantic-ui.com/globals/reset.html https://semantic-ui.com/globals/reset.html
- earthboundkid 8y agoYou're just wrong. The CSS box model as specified by the standards was totally unusable for making a website where you want boxes to have certain sizes with certain margins and paddings, especially in the days before you could use calc(), so you couldn't mix pixels with percentages. It's true that it was the standard, and so MS should have implemented the standard, but it's also true that what MS shipped made way more sense and every frontend dev turns on their box model when it box-model: border-box became part of the standard.