This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17632 - CSS: define rendering of <li> elements in terms of CSS (handling start="", reverse="", value="", and <li> elements that aren't children of <ol> elements)
Summary: CSS: define rendering of <li> elements in terms of CSS (handling start="", re...
Status: RESOLVED MOVED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other All
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard: blocked on css improvements
Keywords:
: 17633 24645 (view as bug list)
Depends on:
Blocks: 27185
  Show dependency treegraph
 
Reported: 2012-06-28 17:45 UTC by contributor
Modified: 2016-11-28 23:20 UTC (History)
8 users (show)

See Also:


Attachments

Description contributor 2012-06-28 17:45:46 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/grouping-content.html
Multipage: http://www.whatwg.org/C#the-ol-element
Complete: http://www.whatwg.org/c#the-ol-element

Comment:
Ordered list numbering needs to be aware of CSS boxes

Posted from: 98.110.194.72 by bzbarsky@mit.edu
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/16.0 Firefox/16.0
Comment 1 Boris Zbarsky 2012-06-28 17:49:33 UTC
Consider this testcase:

  <!DOCTYPE html>
  <ol>
    <li>One</li>
    <li style="display: none"></li>
    <li>Two</li>
  </ol>

This is interoperably numbered "1, 2" in Gecko, Presto, WebKit, Trident.

The spec right now says it should be numbered "1, 3" as far as I can tell.
Comment 2 Boris Zbarsky 2012-06-28 17:56:56 UTC
Oh, and how should this affect <ol reversed> numbering?
Comment 3 contributor 2012-07-18 17:52:23 UTC
This bug was cloned to create bug 18260 as part of operation convergence.
Comment 4 Ian 'Hixie' Hickson 2012-08-24 19:05:45 UTC
See my comment in bug 17633. Not sure what to do here.

(The ordinal value of the third <li> here is definitely 3. The question is a little more interesting if the second is <li hidden> rather than <li style>, but even then I'd argue it's still 3. But I am fine with the ordinal value not matching the rendering in CSS-based UAs, if CSS can define the rendering. Back when I was speccing CSS3 Lists and Generated Content, I think I'd come up with a way of defining <li> in terms of counters, but I don't know if that went anywhere.)
Comment 5 Ian 'Hixie' Hickson 2012-10-30 22:23:28 UTC
I think we should do this by defining the rendering of <li> entirely in terms of CSS, but that means this is blocked on CSS improvements.

I've added a note to the spec saying that this is not yet defined, in the meantime.
Comment 6 contributor 2012-10-30 22:24:10 UTC
Checked in as WHATWG revision r7491.
Check-in comment: Add a note saying that CSS list rendering is not yet defined.
http://html5.org/tools/web-apps-tracker?from=7490&to=7491
Comment 7 Ian 'Hixie' Hickson 2012-10-30 22:25:22 UTC
*** Bug 17633 has been marked as a duplicate of this bug. ***
Comment 8 Boris Zbarsky 2012-11-26 05:09:44 UTC
Unfortunately, <ol reversed> uses the ordinal values, not anything to do with CSS, right?  So I believe that for the testcase in comment 1 with @reversed thrown in the spec simply doesn't match implementation reality right now...  Not sure how much that matters, since no one is using @reversed in practice yet.
Comment 9 Ian 'Hixie' Hickson 2012-11-26 20:49:29 UTC
bz: Right, but that's only because CSS can't define that yet (the improvements mentioned in comment 5).
Comment 10 Ian 'Hixie' Hickson 2012-12-10 23:10:37 UTC
Marking this REMIND for now; I'll reopen in a few months to investigate what the story is with CSS' side of this. In the meantime, I recommend trying to get the CSS WG to make lists be able to handle this markup natively. :-)
Comment 11 Anne 2016-03-16 14:33:26 UTC
*** Bug 24645 has been marked as a duplicate of this bug. ***
Comment 12 Anne 2016-03-16 16:33:26 UTC
According to Tab Atkins this should be mostly possible using 'counter-set'. He suggests that for "reversed" HTML introduces a new internal value for 'counter-reset'.
Comment 13 Simon Pieters 2016-11-28 23:20:46 UTC
https://github.com/whatwg/html/pull/1916
https://github.com/whatwg/html/pull/2002

This seems mostly addressed, except HTML's rules still can't be expressed in CSS concepts. That seems unlikely to change in the near future AIUI. If there is interest in that or if there are still issues, please file new ones in GitHub.