4 ms·
If the semantics of margin really are a problem as the article suggests why not use a css grid with a gap? Surely creating a JS component just to add a small ga
by memco 6y ago
If the semantics of margin really are a problem as the article suggests why not use a css grid with a gap? Surely creating a JS component just to add a small gap is a more egregious semantic violation? I would argue that the icon is a visual only element and so the element should render correctly with no icon and the icon should add the necessary space to separate itself from the text.
- vages 6y agoHe commented on this in the "What about `gap`?" info box. I want to add that gap does not work well when you want different gaps between different items; then you have to whip out margins again.
- krsdcbl 6y ago... or pass a class to the component variant and set an according gap? Adding a dedicated node with it's own properties to adjust width of whitespace is nowhere a better solution than just adding a css class