- From: Daniel Glazman <Daniel.Glazman@der.edf.fr>
- Date: Thu, 04 Jun 1998 13:47:02 +0100
- To: kebl0820@sable.ox.ac.uk
- CC: Style Sheet mailing list <www-style@w3.org>
Tim Bagot wrote:
> But is rather limited, since you need separate rules for each level of
> nesting, even where the same sort of numbering is used. I feel that it
> would be useful (CSS3?) to be able to include the :before content of the
> containing list element, or possibly use some sort of looping to access
> parent counters sequentially.
Yes, this is a possible solution but I would prefer to be able to access
in declarations attached to a LI the counter() value of the LI ancestors...
Decoration boxes are not elements and their content is not meant to
be accessible by a content() notation. In my opinion, at least.... ;-)
Then we could have for 1st and 2nd level lists with decimal numbering
for 1st level and lower-case alpha for 2nd something like :
OL { counter-reset(item) }
OL > LI:before { counter(item) ". " ;
counter-increment: item }
OL > LI > OL > LI:before { content: counter(item, 1, arabic) "." counter(item, 0, lower-alpha) ". " ;
counter-increment: item }
Specificity would then give the correct marker to 1st and 2nd level items.
The example above is a bad example because it breaks the existing order of
arguments of the counter functional notation. But this 'way' of doing nested
numberings is surely another simple and low-cost solution.
</Daniel>
Received on Thursday, 4 June 1998 07:45:25 UTC