Good idea, but I’d go a bit further still: modify the current CssLayout to have only one DIV instead of three. There’s no need to have those three just to provide margin support for CssLaout (or any other layout).
Speaking in a more general sense
, my personal feeling is that our current layouts are way too bloated to be efficient and usable. They just try to tackle all problems with only a few classes, and the result is suboptimal for everyone. In theory there are no problems with them, the feature-set is good, but in practice many of the layouts are too slow and restricting in styling.
What I tried to convince to myself and others in our team is that it’s totally possible to build complex layouts with only one DIV element that allows flexible styling, and performs quite fast as well (Firefox is still a problem). But DashLayout isn’t the final solution either.
That’s why I’m willing to propose the branching of expand ratios away from the core layouts. Expand ratios are a relatively rarely needed feature, and most of the time it’s used only for the larger parts of the view, not when you’re laying out components for a simple form. The basic task of getting stuff on the screen in some orientation or a grid should simple.
And if we’d split expand ratios away from VerticalLayout, and implement it using a single DIV element, that would basically be the exact same thing as CssLayout, right? Probably it would still make sense to extend either from the other, but the foundation would be very similar.
Then the version that do support expand ratios could instead ditch generic component caption support, which causes a lot of gray hair when combined with expand ratios and spacings.
My needs are mostly dictated by my experiences implementing some application themes/layouts, and hence I can’t speak for everyone who might for example work on forms and people who are less than familiar with CSS.
Would there be interest in forming some sort of group to discuss the layout system in general?
Ideas about how to improve, make laying out components easier and more predictable/understandable?