- From: Arron Eicholz <Arron.Eicholz@microsoft.com>
- Date: Wed, 16 Mar 2011 23:27:31 +0000
- To: Peter Moulder <peter.moulder@monash.edu>
- CC: "www-style@w3.org" <www-style@w3.org>
On Tuesday, September 07, 2010 2:28 PM Peter Moulder > > By "numbering" here, I mean the number as distinct from what string to > display for a given number. > > As far as I've seen, there's no text saying what number to give for a given list- > item. The closest I've seen is an example of an <li> list in an HTML document; > but note that that's an HTML list, whose numbering is [more or less] defined > by the HTML spec, and so doesn't tell us much about how <span > style="display:list-item"> should be numbered, or how list-items in generic > XML documents should be numbered (when styled by CSS). > > I append a document with a few tests, to see what existing user agents are > doing. > Of the four user agents I tested, no two do the same thing. > > In the implementations I looked at, it seems that in an HTML document, <ol> > is special for display:list-item elements even other than <li>; and numbering > of list-items that are descendents of an <ol> element had less variation in > behaviour. > > (Looking at WebCore source code, it seems that the test is ol or ul. > A reasonable starting point for the relevant code in WebKit would be > RenderListItem::calcValue.) > > <ol> loses its magic in generic XML documents in each of the user agents > whose generic XML behaviour I tested. > > > Relevant to discussion would be http://www.w3.org/TR/css3-lists (search for > counter; though the main point is that display:list-item implicitly increments a > counter called list-item), and its dependency http://www.w3.org/TR/css3- > content/ for most of the information regarding numbering. Whether > intentional or not, the numbering appears to be order within document tree, > as modified by pseudo-elements such as :before and :after (by my reading, > though it isn't very clear about this), and as modified by display:none, but not > modified by run-in or 'caption-side' or anonymous block box processing; and > as modified by the suppression of children of 'table-column' boxes and > suppression of non-'table-column' children of 'table-column-group', but not > modified by the rest of anonymous table object creation rules. (Anonymous > block processing and anonymous table object creation don't affect order of > boxes/elements, but would be relevant to counter > scope.) > > Note that both css3-lists and css3-content are at working-draft status. > > Possibly the resolution to this issue would be to note explicitly that CSS2.1 > does not define the number assigned to a given list-item, and that this is > expected to be defined by a future level of CSS, probably making some > mention of css3-lists (already in refs.html as #ref-CSS3LIST). > > > I attach the HTML version of the tests, while the corresponding XML version > (and its associated stylesheets, and the HTML version for good measure) is at > http://bowman.infotech.monash.edu.au/~pmoulder/html-tests/list-item- > numbering/ > > N.B. One of the tests caused a segfault in a WebKit-based browser; if that > happens then comment out the :before rule in the stylesheet. > Thank you for your feedback. The CSSWG has addressed your concerns in the upcoming publication of the CSS 2.1 specification[1]. The CSSWG resolved to add a note making the exact numbering undefined for CSS 2.1. We hope this closes your issue. Please respond before 18 March, 2011 if you do not accept the current resolution. [1] http://w3.org/TR/CSS
Received on Wednesday, 16 March 2011 23:28:04 UTC