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

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