Re: [css3-regions][css3-gcpm] Thoughts on Plan A and Plan B

Brad Kemper:
> On Feb 22, 2012, at 5:50 AM, Christoph Päper wrote:
> 
> … I disagree that the @page rule cannot say anything about what is painted on it. I would like it to be more like @region. Regions and pages are very similar concepts.

They are, and both should be limited to their own style.

> I also disagree that selecting the children of a pseudo-element is an insurmountable problem. I think we should remove this restriction from the selectors spec. It does not serve the needs of authors; it only seems to be there to make things more convenient for implementors.

It’s there because otherwise there would be too many circular dependencies … and you would have to be able to match against the box tree – can of worms.

>> “body:first-page” (…) would match the ‘body’ element (…) if and only if it is completely on the first page …
> 
> Only if we spec it that way, …

No, that’s how (pseudo-)classes work. They narrow down the number of matching subjects, they don’t match parts of subjects.

> … as regions does …

The Regions concept and draft are too much in a flux to serve as an example for anything.

>> 1.  ‘@page’ <page-name>? <page-pseudo>? <normal-selector>
>> 2.  <pseudo-region> := ‘:::first-page’ | …
>> 
>> The latter variant extends the differentiation between pseudo-classes (1 colon) and pseudo-elements (2 colons) to pseudo-regions or pseudo-pages (3 colons). Like pseudo-classes may apply to pseudo-elements, both may apply to pseudo-regions.
> 
> This seems overly complicated, compared to putting the rules inside @page, with no real gain. It would be more confusing for authors to have to learn this new pattern, when they already get confused about the difference between a pseudo-class and a pseudo-element.

As if the widely varying syntax of at-constructs wasn’t confusing enough already. By now we probably have some at-rule for all of the following patterns:

  @foo;
  @foo bar;
  @foo {bar: baz;}
  @foo bar {baz: qux;}
  @foo {bar {baz: qux;}}

You seem to want to add the bastard mix

  @foo bar {baz: qux; oof {rab: zab;}}

>> Rules and rulesets shall not appear on the same syntactic level.
> 
> Agreed WRT combining them at the same level, but it is not too late to change @page to not have bare declarations without a selector and braces.

Huh? Do you want to turn

  @page {margin: 2cm;}

into

  @page {@ {margin: 2cm;}}

or what? That would mean changing CSS 2.1 – that’s a no-do.

Received on Wednesday, 22 February 2012 19:21:08 UTC