- From: David Perrell <davidp@earthlink.net>
- Date: Thu, 8 May 1997 13:41:02 -0700
- To: <www-style@w3.org>
I suggested counter properties in CSS such that every element has an associated counter. By default, the counter has a value of 1 decimal, but can be explicitly declared with any initial value and type. An element's counter value can be referenced by an offspring using the counter property - which causes the counter to be incremented - or by using the count property - which does not increment the counter. An element's counter is only incremented when accessed by an offspring. Paul Prescod suggested the numbering method used in DSSSL, whereby an element's number within the hierarchy is known. There is no explicit incrementing of counters - if an element is the sixth sibling in a list, its child-number is 6. The DSSSL method strikes me as a more elegant solution than my last insofar as my solution could require elements to be declared for the sole purpose of counting other elements. A few questions, though: 1. HTML documents might be part of a larger document. How do you specify an element's start number using the DSSSL method? 2. How to specify the number type (i.e. decimal, lower-alpha, etc.)? 3. What's the proper syntax for referencing an ancestor element's number? 4. Would an element's number include occurrences of its subclasses? (i.e. would P.first be included in P's child-count?) David Perrell
Received on Thursday, 8 May 1997 16:45:26 UTC