Skip to content

Comment on 3px of padding makes all the difference in the world

Comments

It's always tricky to adjust the padding/margin values because you need to take into account each case in which these 3 added pixels will have an impact. Maybe the style applied to this particular box is shared with other elements or maybe this box is used in other contexts where 3 pixels more will look odd. And I guess that for a website as dense as Facebook, it's easy to try to adjust something while breaking something else.

On a side note, whenever I set the margins of adjacent elements, I take some time to wonder if I'll put a margin-bottom on the 1st element or a margin-top on the 2nd one, or put both margin-top and bottom on the middle element and none on the 1st and 3rd. My rule of thumb ends up being the following one: use only one margin (top or bottom) on all adjacent elements, because some of them might disappear on some pages, so I need to provide some kind of flexibility in order to maintain a decent spacing for each and every scenario.

Facebook is probably built in a much mote modular way. I doubt fixing it would break anything else. Facebook engineers should be able to figure this out very quickly.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.