On Tue, Dec 20, 2011 at 1:45 PM, Alan Stearns <stearns@adobe.com> wrote:
> There are plenty of examples in other specifications that use divs for the
> purpose of styling a collection of child elements. The only wrinkle in
> regions is that those child elements come from a different branch of the
> element tree. Is a div whose sole purpose is to draw a border around a set
> of child elements clutter? Or a div that's only there to turn on
> display:grid? Some 'wrapper' divs are quite useful and uncontroversial. I
> think region divs should be considered as wrapper elements, even if they
> appear to be empty in the markup.
Yes, those divs are clutter, if they're not being used for anything
else. In some cases they're sufficiently worthwhile that we ignore
the clutter (like requiring a wrapper to hook a new layout mode off
of), but others are just things that we bear for now, because there's
no other way around them yet, like drawing a border around a group of
elements.
What's worse, regions are tied relatively tightly to the screen. If
you change your layout with MQ you'll often want more or less regions,
to adjust for the new layout. This means you either need to use JS to
dynamically insert/remove the wrappers, or just throw in the maximum
amount of wrappers that any of your layouts may need, and ignore the
ones you're not using in a particular layout. These sorts of concerns
are rarely shared by the other types of wrappers.
Imagine, for example, needing a wrapper for every cell in Grid. That
would remove a large amount of the elegance from the spec. Regions is
currently mandating that.
Officially, I'm fine with leaving Regions alone for now, with the
understanding that we'll solve the problem in the near future with
some mechanism for generating arbitrary pseudo-elements.
~TJ