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 23:46:06 +0200
Message-ID: <21094.61982.676173.477216@gargle.gargle.HOWL>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "www-style\@w3.org" <www-style@w3.org>
Tab Atkins Jr. wrote:

 > >    @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.  The fact that it's intuitive to act
 > that way has confused plenty of people over the years, which is why we
 > introduced the :nth-match() pseudo-class in Selectors 4, so you can
 > get the intuitive behavior in some manner.

Coming back to this, I guess I don't see how the nth() selectors above
is fundamentally different from a selector like :nth-of-type(). 

nth(1) selects the first page in a sequence of "sibling" pages, while
nth-of-type(1) selects the first element in a sequence of sibling
elements, no?

              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Tuesday, 22 October 2013 21:46:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:03 UTC