3 ms·
Margins are part of the specification of CSS. Banning them would be crazy. If you don't like thinking about them, sure .. introduce the concept of spacer eleme
by lwhi 5y ago
Margins are part of the specification of CSS. Banning them would be crazy.
If you don't like thinking about them, sure .. introduce the concept of spacer elements in your framework. But outlawing something because you don't fully understand its purpose isn't the way to go.
- ratww 5y agoI would recommend reading the article, or at least the top comments here. This is not what the article is advocating.
- lwhi 5y ago> We should ban margin from our components. Hear me out. Maybe the first line of the article? The implementation of the CSS spec is closely optimised for performance by the browser. Trying to achieve the same outcome by using other means, might feel like a clever way of conceptualising .. but I'd argue there's absolutely no need.
- ebingdom 5y ago> because you don't fully understand its purpose How did you arrive at the conclusion that OP doesn't understand margins?
- lwhi 5y agoBecause the author has gone to such lengths to avoid them! Creating extra markup specifically for presentation for example ..