Re: Counter mechanism on boxes or elements

On 2/19/10 3:06 PM, Robert Stam wrote:
> Question: In the current CSS specification, does the counter mechanism
> apply to the elements/document tree or to the boxes/render tree?

   The scope of a counter starts at the first element in the document
   that has a 'counter-reset' for that counter and includes the
   element's descendants and its following siblings with their
   descendants. [1]

> it seems logical to define the counter
> mechanism on the boxes/render tree instead of the document elements.

For what it's worth, Gecko has an entirely separate data structure, 
which is neither the box tree nor the element tree, for keeping track of 
counters.

-Boris

[1] http://www.w3.org/TR/CSS2/generate.html#scope third paragraph.

Received on Friday, 19 February 2010 20:37:02 UTC