Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
iLoveOncall
· 4y ago · 0 comments
Hum, just use `box-sizing: border-box` and you solve the problem that the author has without using a complete anti-pattern.
Comments
[–]
kylemh
4y 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.