W3C home > Mailing lists > Public > www-style@w3.org > December 2011

Re: [css3-regions] Avoid Markup Clutter

From: Alan Stearns <stearns@adobe.com>
Date: Tue, 20 Dec 2011 13:45:27 -0800
To: fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <CB1641F7.9E1D%stearns@adobe.com>
On 12/20/11 11:37 AM, "fantasai" <fantasai.lists@inkedblade.net> wrote:

> On 12/20/2011 10:53 AM, Christoph Päper wrote:
>> | The CSS regions module is independent of the layout of regions
>> | and the mechanism used to create them.
>> This module absolutetly should specify a means to generate stylable regions
>> without additional markup. Whether it is an at-rule or a pseudo-element is
>> debatable. I prefer Œ@region¹, though.
>> Then, Œ@region¹ like other at-rules, should be followed by an (optional)
>> identifier / name, not an selector. Instead of an approach like Œ@media¹ with
>> nested rulesets, the region name should be part of the selector inside a
>> pseudo-class:
>>    @region foo {position: absolute; Š}
>>    p                {color: red; Š}
>>    p:in-region      {color: orange; Š}
>>    p:in-region(foo) {color: green; Š}
>> | However, for simplicity, our example uses elements as regions Š
>> That would be setting a bad example. Regions should come from
>> the box tree, not from the node tree.
> I agree 100%. We should not be promoting bad examples.

I like the idea of making boxes in CSS, but I don't think the use of such a
feature should be limited to regions. It makes more sense to me to have a
generic way of making boxes for any kind of styling. But we'd need a
separate specification for the regions examples to use that mechanism, and
then we're tying the regions work to what (I think) should be a separate

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.


Received on Tuesday, 20 December 2011 21:46:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:50:11 UTC