|
|
|
|
|
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. |
|
>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.