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

Re: New version of the Selectors module of CSS3

From: Jonas Sicking <sicking@bigfoot.com>
Date: Mon, 9 Oct 2000 00:46:47 +0200
Message-ID: <01e401c03179$a4596620$3110f7d4@ericsson.se>
To: "Ian Brockbank" <i.brockbank@indigovision.com>, <www-style@w3.org>
Ian Brockbank wrote:
> Hi Ian, Jonas,
>
> > > STRUCTURAL PSEUDO-CLASSES
> > >
> > > I propose the following list of pseudo-classes. They are largely based
on
> > > the :nth-child and related pseudos in the current draft, but have been
> > > made more useful, more generic, and more consistent with each other.
> [ snip ]
>
> This seems a great idea.  There just seems to be one thing lacking
> (maybe I'm missing something).
>
> How would one format alternating blocks of n elements with this scheme?
> (Using either syntax)  I can see a desire to do something like
>
> TR:child(1,6,3) /* address first three of six */
> TR:child(2,6,3) /* address second three of six */
>
> to have alternating bands of equal size.  (I'll leave you to improve
> the syntax; this was just an omission which jumped out at me).

Hmm.. don't really understand the syntax but agree that the functionallity
is good. I would propose something like

TR:every-nth-child(6,1 to 3) { ... } /* first three of six */
TR:every-nth-child(6,4 to 6) { ... } /* last three of six */


one other syntax that could be handy is

TR:every-nth-child(6)

which would be the same as

TR:every-nth-child(6,1)

but a bit slimmer and easy to read/write.

/ Jonas Sicking
Received on Sunday, 8 October 2000 18:45:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:06 GMT