Hacker News new | ask | show | jobs
by djrockstar1 1630 days ago
The text of the article contains an argument to avoid margins when creating reusable components, instead allowing the consumer of the component define its margins. There is no argument made against using margin properties.
3 comments

I thought the argument, after reading the article, was to use spacer components that would define the space between elements because you would then be able to have differing margins when using in different contexts.

>avoid margins when creating reusable components

so, if this is using margins then they are not using reusable components? I mean, I have a difficult time taking the advice regarding CSS usage from someone not using reusable components.

Aside from all the other things people are saying this person doesn't know about, I don't think they know about the min, max, and clamp CSS functions which when used with margins can be amazing. Not to mention that the need to have different margins in different components uses might be handled with CSS variables, not mentioning that the variable can change due to its context seems an oversight making the rest of the article less than impressive.

on edit: it is of course a cheap shot to argue their site uses margins etc. I just wanted to note that I had sort of a disagreement as to the main takeaway from the article, and then I noted why I disagreed with that takeaway.

They're not defining any margins though. They're using spacing components, and the article says no components should use margins.
Then the title of the article is misleading and should be changed to avoid confusion
or you could maybe read the article before looking at its source code for a gotcha?
or may be we should continue looking for gotchas when it comes to clickbait misleading titles and finally get the message of "clickbait is wrong" across to at least some part of tech blogging community?
Thing is, clickbait works, so people will continue doing it. All your "gotcha" showed was that it works. Look at all the people in this thread engaging with this post, not because of its content but because of its title. If a clickbait title will lead to higher engagement, why would an author not use it?

The best way to combat clickbait is to not fall for it, not play into it, to either ignore the article, or to read the article and discuss or critique the content instead of bringing more attention(all press is good press) to the title.

> Look at all the people in this thread engaging with this post, not because of its content but because of its title.

All I see is a discussion that’s been massively derailed by a shitty title. If it had a sensible title, perhaps people would be talking about the actual concept that the article was trying to tackle instead of threads like this where people keep having to explain that the title doesn’t match the article.

“Engagement” for the sake of engagement is worthless unless you are optimising for noise instead of signal.

My gotcha and the negative reaction to it shows only that the majority of readers are ok w/ using of clickbait titles. That's a pity. Although bringing attention to such things always gets negative reaction in the beginning. Not the reason to stay silent anyway.

> If a clickbait title will lead to higher engagement, why would an author not use it?

Out of intellectual/professional honesty e.g.?

The negative reactions to your post are due to the laziness of not reading the article and the "gotcha".

I think most of us come to Hacker News for interesting discussions, and the torrent of confidently incorrect "this person is wrong" comments is not adding anything to any discussion.

The top comment is already clarifying the title, so any other comment should be unnecessary, especially snarky ones.

The gotcha is another problem in itself: not only it comes from a misunderstanding of the post, a lot of people don't have control over their publishing software, but their advice should be judged on its own merits, not on some "you criticise society yet you participate in it" way [1].

[1] https://knowyourmeme.com/memes/we-should-improve-society-som...

I mean, the top comment is someone proposing a better title. That's actually adding value to readers, compared to nonsense points that have nothing to do with the article. And that comment already was there when you commented, too.