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

Re: [css3-lists] scoping and display: list-item

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Wed, 07 Dec 2011 17:07:47 +0100
Message-ID: <4EDF8F53.4060501@kozea.fr>
To: www-style@w3.org
Le 07/12/2011 16:57, Tab Atkins Jr. a écrit :
> The numbers do not indicate nesting, but rather name individual
> counters.  The item[4] counter is a brand new counter, so it gets a
> new number.
>
> As well, item[0] is out of scope by virtue of the fact that item[4] is
> declared in the first place - a scope only extends up to the first
> sibling that resets the same counter.  Similarly, the item[2] counter
> is out of scope when the item[3] counter is created.
>
> The scope chains in the example are:
> 0
> 0 1
> 0 1 2
> 0 1 3
> 4

Ok, I understand.

Speaking of scope: elements with "display: list-item" increment the 
list-item counter. Is that with the same scoping rules as 
counter-increment? Namely, if the counter is not in scope at this point, 
a new counter is created with the usual scoping rules.

Side question: are pseudo-elements (::before, ::after) allowed to have 
"display: list-item" or the counter-* properties? What about ::marker?

-- 
Simon Sapin
Received on Wednesday, 7 December 2011 16:08:36 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:47 GMT