W3C home > Mailing lists > Public > www-style@w3.org > October 2013

Re: [css-book] Re: [css-page] Meaning of :first page selector (was: [css3-gcpm] Page groups, named pages, and :first)

From: Håkon Wium Lie <howcome@opera.com>
Date: Tue, 22 Oct 2013 18:38:35 +0200
Message-ID: <21094.43531.679450.116665@gargle.gargle.HOWL>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Simon Sapin <simon.sapin@exyr.org>, "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>
Also sprach Tab Atkins Jr.:

 > > 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.
 > 
 > That's not how selectors work. 

But it's how psedo-elements work. This "selector":

  p:first-line

selects the first line of every p element (by creating a
pseudo-element etc). Likewise, this selector:

  @page funky:nth(2) 

should give us the second page of every funky page group.

Thinking of it as pseduo-elements may make it easier to extend into:

  @page funky:nth(2) p

Where all p elements inside those pseud-elements are selected.

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Tuesday, 22 October 2013 16:39:23 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 22 October 2013 16:39:23 UTC