Hacker News new | ask | show | jobs
by wwweston 974 days ago
I'd agree vertical margin collapse rules have some counterintuitive cases. And I've definitely seen (and used) something like:

h1, h2, h3, h4, h5, h6 { margin: 0 0 1em 0; }

which fits with the expectation that headers don't need to kick off with a vertical margin along with overflow containment rules to manage that behavior.

I don't know if I've seen using padding values to do margin's job lead to less pain.