8 ms·
Hum, just use `box-sizing: border-box` and you solve the problem that the author has without using a complete anti-pattern.
by iLoveOncall 5y ago
Hum, just use `box-sizing: border-box` and you solve the problem that the author has without using a complete anti-pattern.
- kylemh 5y agoNo, it doesn't. Margin may not affect the width and height of the element with `box-sizing: border-box`, but margin still breaks encapsulation and reusability of the component. You make layout assumptions by applying margin to a component.