Y
Hacker News
new
|
ask
|
show
|
jobs
by
iLoveOncall
1629 days ago
Hum, just use `box-sizing: border-box` and you solve the problem that the author has without using a complete anti-pattern.
1 comments
kylemh
1629 days ago
No, 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.
link