W3C home > Mailing lists > Public > www-style@w3.org > November 1997

css2 - 6.3 Attribute selectors

From: David Perrell <davidp@earthlink.net>
Date: Tue, 25 Nov 1997 11:37:04 -0800
To: "Style" <www-style@w3.org>
Message-ID: <01bcf9d9$821a1c60$4e8cd9cf@davidp>
Thinking of alternatives to 'first' and 'last' pseudo-classes...

How about adding two built-in dynamic attributes for sibling number and
sibling position[1]? These would be valueless attributes that reflect the
order on the page of like-element siblings. For general elements, this
number/position would include any classes and/or IDs. A separate
number/position would be kept for each class and ID. Examples:

  P [1] { ...      /* The first P among sibling Ps */

  P [first] {...   /* likewise */

  P [2] { ...      /* The second P among sibling Ps */

  P [last] {...    /* the last P among sibling Ps */


David Perrell

[1] http://www.w3.org/TR/WD-CSS2/selector.html#h-6.3
Received on Tuesday, 25 November 1997 17:46:05 GMT

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