Re: New ::first-page pseudo-element

Michael Day:

> To achieve this we have implemented a new ::first-page pseudo-element,

I assume you’ve implemented it with a vendor prefix.

I thought at first that

  foo::first-page {page-break-before: always;}

would not work well, but since the proposed pseudo element matches the first page that selector’s box appears on and not (necessarily) the very first page of the document, it would work indeed.

The ‘::first-line’ pseudo-element may match the same line of glyphs for nested nodes, and it may span several (parts of) inline boxes. The first page a node’s box appears on, on the other hand, may be the same page a lot of ‘::first-page’ selectors would refer to, even from nodes only distantly related.

I wondered whether the ‘:first’ pseudo page selector <http://dev.w3.org/csswg/css3-page/#left-right-first> could be extended, instead, to make the common usecases possible:

  foo {page: bar; columns: 2;}
  @page bar:first {columns: 1;}

This, however, would require new ways of inheritance from a (named) page to boxes that appear on it and this wouldn’t be worth it.

Received on Wednesday, 26 October 2011 12:51:15 UTC