Semantic-Org / Semantic-UI

Semantic is a UI component framework based around useful principles from natural language.
http://www.semantic-ui.com
MIT License
51.07k stars 4.96k forks source link

[Proposal] Layout elements from top to bottom and not the other way #5404

Open akomm opened 7 years ago

akomm commented 7 years ago

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).

stale[bot] commented 6 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.

akomm commented 6 years ago

Well, I think this is still relevant.

stale[bot] commented 6 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.

ivantcholakov commented 6 years ago

ping