Open akomm opened 7 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.
Well, I think this is still relevant.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.
ping
Components like icon, button, progress (not a full list) are less reusable, when you propagate layout from those components into the parent's space. An example are outbound margins. Adding margins makes implication about the layout in which those components are placed and narrows down its flexibility.
The layout definition flow should go from top to bottom in the DOM/Component tree. A component defines its style and behavior, not how it is placed or arranged within a certain context - it should be unaware of this context. An list item should not define margins, instead the list should arrange the items in it correctly.
This also works well with web components concepts and libraries like react or frameworks like angular.
An even more advanced approach would be to have all elements fluid behavior, so no size configurations are needed at all. You could drop those components into layout (grid, flex, whatever) and they take the shape you layout them to have (including maybe stretching if you do incorrect layout, its your responsibility).