Re: CSS Regions proposal

Arno Gourdol (via Stephen Zilles):
> 
> http://lists.w3.org/Archives/Public/www-archive/2011Mar/0011.html
> 
> This proposal is intended to support sophisticated, magazine-style, layouts using CSS.

I haven’t followed the development of the Paged Media <http://dev.w3.org/csswg/css3-page/>, Flexbox <http://dev.w3.org/csswg/css3-flexbox/> and Grid Align <http://dev.w3.org/csswg/css3-grid-align/> modules lately at all, but it seems neither did the authors of this proposal. Otherwise they would have avoided some mistakes and had reused ideas or designed them in a similar way.

Several parts of this draft by Adobe go against how CSS (and HTML) works and is supposed to work. Nevertheless the basic idea is important and CSS should probably support more complex layouts with text flowing from one box to the other, which necessitates a further decoupling of CSS boxes from HTML elements or DOM nodes.

The proposed ‘region-thread’ property, which seems always to be applied to empty HTML elements, looks as if it better was better build with an abstract at-keyword. Also the odd “::region <selector>”, which seems to have been called ‘region-styling’ earlier, wouldn’t be necessary then.
The proposed ‘content-consumption’ property could then probably be replaced by the exisitng ‘content’ property, maybe with a new keyword. <http://dev.w3.org/csswg/css3-gcpm/> <http://www.w3.org/TR/CSS21/generate.html#content>
The proposed ‘region-shape’ property looks like it could be replaced by a pimped version of the “good” old ‘clip’ property <http://www.w3.org/TR/CSS21/visufx.html#clipping>, although it works on the border box and not the cntent box AFAIR. Also note that this might have to interact with ‘box-sizing’.
Exclusions are so ill-defined that I don’t know where to start. They look like badly inspired from SVG. Enhance the ‘clip’ property instead, maybe making it a shorthand for two properties that control outside and inside clippings.

  @region "Foo" {
    region-index: 1;
    content: continuous-thread;/*?*/
    clip: polygon(…, …); 
    clip-inner: circle(…);/*?*/
    …
  }

You could introduce an additional or supplementary pseudo-element that works similar to ‘::first-line’.

  bar::region("Foo") {color: red; font-size: bolder; …}

But I’m sure most of that has been pointed out at the latest FtoF already.

Received on Wednesday, 9 March 2011 13:26:45 UTC