Live data from Hacker News

The Rules of Margin Collapse

joshwcomeau.com

1–10 of 35 posts

Re: The Rules of Margin Collapse

#5
That’s because too many hedge funds and other speculators have been borrowing on margin, and that leads to collapse. Regardless of what rules are set up to regulate this, rampant speculation and bubbles can always destabilize a market and lead to collapse!

You see, what happens is that capitalism rewards the greater risktakers and when the success stories have survivor bias you end up with — oh we’re talking about CSS? Sorry, nevermind.

Re: The Rules of Margin Collapse

#9
post #4

One of those things I've just been subconsciously dealing with for years without ever deciding to actually learn the rules. "Damn it collapsed. Okay padding then"

The behavior is very obvious if you use them for text. (I have had a few cases of naively stating my margins, the browser exactly displaying what I meant, instead of what I thought I have said, and needing to understand why it worked.)

Just don't use margins for layout, I guess.

Re: The Rules of Margin Collapse

#10
post #4

One of those things I've just been subconsciously dealing with for years without ever deciding to actually learn the rules. "Damn it collapsed. Okay padding then"

The behavior is very obvious if you use them for text. (I have had a few cases of naively stating my margins, the browser exactly displaying what I meant, instead of what I thought I have said, and needing to understand why it worked.) Just don't use margins for layout, I guess.

It actually makes sense for laying out UI elements. Unfortunately there is no horizontal collapse.
Post reply on HN