-
-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Row and Column as subclasses or shorthands of Box #3010
Comments
The one notable argument against Row/Column classes is that it merges style with content - in principle, with a full CSS engine, it should be possible to take a single composition of boxes, and turn it into a near arbitrary layout. There's also the question of what happens when someone writes However, pragmatically, we don't have a full CSS engine yet; and most users aren't thinking about their app from a "full separation" lens, so I guess including Row/Column as a feature, and documenting the "problems for advanced users" is a reasonable compromise. |
Merging style with content is indeed what I was proposing in #3011. In that model, Column and Row would override the Alternatively, I guess Let's first decide how to proceed in #3011, and then come back to this. |
This also helps people who are taking advantage of the fact that "row" is the default direction to save typing. |
Rows and columns are used more than any other component, and often don't have any style properties other than
direction
, so this would save a lot of typing.I think it would also make the structure of the UI easier to visualise from the code if the direction was a bit more prominent rather than buried in a property. Compare:
with:
The text was updated successfully, but these errors were encountered: