3 ms·
This is a horrible idea, and the article reads like the author has completely lost the notion that there is even a thing like CSS. Please just add margin-right
by krsdcbl 6y ago
This is a horrible idea, and the article reads like the author has completely lost the notion that there is even a thing like CSS.
Please just add margin-right to the icon that is already an actual targetable node in your DOM or skip the headache altogether by making your button display:grid & setting appropriate gutter width or something.
But the proposed idea is nothing but a showcase of everything that's wrong with "styled components only" and where it might lead you.
- krsdcbl 6y ago(unable to edit, addendum: the fallacy even begins with the idea that you'd need a <span> now to set margin and therefore you HAVE to introduce another node anyway - how about just giving your icon marginRight and be done?)