- From: Håkon Wium Lie <howcome@opera.com>
- Date: Tue, 22 Oct 2013 14:40:39 +0200
- To: Simon Sapin <simon.sapin@exyr.org>
- Cc: "Cramer\, Dave" <Dave.Cramer@hbgusa.com>, "www-style\@w3.org" <www-style@w3.org>, MURAKAMI Shinyu <murakami@antenna.co.jp>, Michael Day <mikeday@yeslogic.com>
Simon Sapin wrote: > > I would like to note that solutions that involve the content of margin > > boxes (like first-except) don't meet all our use cases. A chapter-opening > > page may have a background-image, different margins, etc. > > Again, I definitely agree that that page selectors need to be more > powerful, including to select the first page of a group. (For some > definition of "group" that remains to be specified.) I've tried to specify what a page group is here: Named pages can appear in sequence, stemming from different elements. A sequence of pages with the same name is called a page group. It is sometimes necessary to split one page group into several page groups in order to, e.g., address the first page in the group. The page-group property expresses whether an element starts a new page group or not. http://books.spec.whatwg.org/#page-groups > For 15 years since CSS 2.0 (which already had named pages), ':first' has > been defined as "first page of the document": > > http://www.w3.org/TR/1998/REC-CSS2-19980512/page.html#q8 > > Instead of changing it now, I’d rather have a new page selector such as > :first-of-group and possibly :nth-of-group() (together with :nth() which > counts in the document.) To me, it seem quite intuitive that @page :nth(1) { ... } selects the first page and that @page funky:nth(1) { ... } selects the first page of the "funky" group I don't see a need for further syntactic differentiations. Also, this has been implemented and used for years. > As to how page groups are delimited, a boolean 'page-group' property > does not seem very elegant. Perhaps an optional keyword on the 'page' > property? I agree that boolean properties should be avoided. This is probably why it took so long to bring it into the spec. But optional keywords will turn the page property into a shorthand and someone will quicly ask to expose it in a separate property. -h&kon Håkon Wium Lie CTO °þe®ª howcome@opera.com http://people.opera.com/howcome
Received on Tuesday, 22 October 2013 12:41:27 UTC