Closed oney closed 3 years ago
That's hard because there is no right way, css is terrible. The issue with setting margin-top and margin-bottom on each element is that it would probably get harder to understand, and there would be the issue where you can't reorder items by hand. When you see the empty divs you can just see what is going on.
The code pointer is https://github.com/bernaferrari/FigmaToCode/blob/master/src/html/htmlMain.ts#L61 It's more a preference, but normally when we write html/css to add spacing, I believe we will use margin-bottom or margin-right rather than adding empty div.