Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Exactly. Css is magic, in a sense that you can’t make any sense of it. Just look at this: https://stackoverflow.com/a/19719427 , you can “tune” collapsing margins by adjusting overflow, float or position. Yeah! Imagine adjusting your seat by pressing brakes or turning radio off.

Perhaps the only difference when using hidden is the unintended consequence of hiding content if the parent has a fixed height

This is css community fundamentals. It works “perfectly”, but make sure your height is not specified. Oh, and don’t change the container type. And with time it all depends more and more on other hacks, until your layout turns into a knot of hacks and cross-sectional assumptions smeared all across the “codebase”.

And then you ought to make fully isolated non-leaky components with it. I mean, you can’t, but here’s a hack to make them fit together. I mean, in this particular case, wow thank god the container is already position absolute.



> Just look at this: https://stackoverflow.com/a/19719427 , you can “tune” collapsing margins by adjusting overflow, float or position. Yeah! Imagine adjusting your seat by pressing brakes or turning radio off.

The seeming complexity here is because people refuse to learn the box model, so they learn all sorts of incantations and guess at what they need to do: https://developer.mozilla.org/en-US/docs/Learn_web_developme...


C is magic in that I can’t make any sense of it when I don’t bother to learn it.


Thanks for not posting the link to the “boxing model”. It gets posted every time, as if web/css invented boxing and padding and spacing and borders, and everyone else was a clueless noob. Which clearly shows inability to even comprehend both the problem and how deep css guys are into the bizarre ways of thinking about layouts that css suggests through its paradoxical under- and at the same time over-engineering. Where everything is a combination of crutches that can’t stand straight on their own.

And yes, C is a pile of crap too. I programmed in it for 15 years.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: