Re: [WSG] self-counting list items

2005-08-09 Thread Ben Ward
Yes, it's already implemented in the development versions of Firefox.
If you download Deer Park Alpha 2 (for TESTING!), you should be able
to play with all the CSS improvements.

http://developer.mozilla.org/devnews/index.php/2005/07/12/deer-park-alpha-2-released/

Ben
http://ben-ward.co.uk
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



[WSG] self-counting list items

2005-08-08 Thread Drake, Ted C.
Hi All

I've been struggling with the ability to increment nested ordered lists.
I'm trying to update a page that was built with multiple paragraphs that
lead off with b1.1/b...b1.2/b Etc etc

Naturally, I'd like to replace these with 
ol
li
li
.

I was looking through the w3c specs and came across this example that seems
to be perfect. But I can't get it to work. Has anyone worked with this
before?

http://www.w3.org/TR/REC-CSS2/generate.html#scope 

12.5.1 Nested counters and scope
Counters are self-nesting, in the sense that re-using a counter in a child
element automatically creates a new instance of the counter. This is
important for situations like lists in HTML, where elements can be nested
inside themselves to arbitrary depth. It would be impossible to define
uniquely named counters for each level. 
Example(s):
Thus, the following suffices to number nested list items. The result is very
similar to that of setting 'display:list-item' and 'list-style: inside' on
the LI element: 
OL { counter-reset: item }
LI { display: block }
LI:before { content: counter(item) . ; counter-increment: item }

...

The following style sheet numbers nested list items as 1, 1.1, 1.1.1,
etc.

OL { counter-reset: item }
LI { display: block }
LI:before { content: counters(item, .); counter-increment: item }

I'm checking this in firefox on win.

Ted






 
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



Re: [WSG] self-counting list items

2005-08-08 Thread T. R. Valentine
On 08/08/05, Drake, Ted C. [EMAIL PROTECTED] wrote:

 I was looking through the w3c specs and came across this example that seems
 to be perfect. But I can't get it to work. Has anyone worked with this
 before?
 
 http://www.w3.org/TR/REC-CSS2/generate.html#scope

Yes. See http://plano.lib.il.us/testing/counters.html

It works in Opera 7+. It is supposed to work with the *next* version
of Firefox. It does not work in IE.


-- 
T. R. Valentine
The only excuse for using IE is ignorance (or testing)
(stupidity is a reason, _not_ an excuse).
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**