W3C home > Mailing lists > Public > www-style@w3.org > December 2001

:nth-of-type & parallel construction

From: fantasai <fantasai@escape.com>
Date: Sat, 29 Dec 2001 11:54:57 -0500
Message-ID: <3C2DF561.F91FE4E4@escape.com>
To: www-style@w3.org
Just as a note for future reference, since its too late to change it now -

"nth-of-type" would be better written as "nth-child-of-type" for
two reasons:
                   1. Clarifies the scope - you can tell it's the nth
                      sibling of that type, and not the nth of type in
                      the entire document, without looking it up
                   2. Parallel construction |

:nth-of-type does not have the same grammatical construction
as :nth-child. In :nth-of-type, 'nth' is the noun being
described. In :nth-child, 'nth' is the adjective describing
the noun 'child'.

:nth-child()      :nth-of-type()       :nth-child-of-type()
 adj. n.           n.  ` adj. '         adj.   n. ` adj. '
                 (of type is an        (of type is an adjective
                 adjective phrase;      phrase; it describes
                 it describes 'nth')    'child')

 adj. adj. `n.'
 adj.  n.  `adj.'

  adj.  n.
  n.    `adj.'

  adj.  n.
  n.  `adj.'

With the :nth-child pseudos, the noun is always 'child'
With :nth-of-type, the noun switches among 'nth', 'last', and 'first'
Received on Saturday, 29 December 2001 11:52:07 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:00 UTC