- From: Ernest Cline <ernestcline@mindspring.com>
- Date: Thu, 18 Dec 2003 12:11:56 -0500
- To: "J. King" <mtknight@dark-phantasy.com>, www-style@w3.org
> [Original Message] > From: J. King <mtknight@dark-phantasy.com> > To: <www-style@w3.org> > Date: 12/18/2003 10:50:08 AM > Subject: Quick question about display property > > > Why is there no inline-list-item value? I know a few times when I've > wanted one, and it's certainly more consistent with block and table. I presume you want the list markers for some reason. Using the ::before pseudo-element and a counter should achieve what you want, without any need for an inline-list-item display value. There is really no need for list-item in CSS3, except that it does make generating nested list markers more convenient. For an inline list tho, it'll either need to generate extra content besides the marker in a language sensitive way, or use something other than a HTML-like list structure. Because of this, trying to create a CSS shortcut for inline lists would not be a good idea IMO. /* Example CSS to provide for inlining an HTML <ol> lists in a mixed English/French document */ ol.inline { display: inline; counter-reset: inline-list } ol.inline li { display: inline; counter-increment: inline-list } ol.inline li::before { content: counter(inline-list) ". " } ol.inline li::after { content: ", " } ol.inline li:nth-last-child(2)::after { content: ", & " } ol.inline li:nth-last-child(2):first-child::after { content " & " } ol.inline:lang(en) li:nth-last-child(2)::after { content: ", and " } ol.inline:lang(en) li:nth-last-child(2):first-child::after { content " and " } ol.inline:lang(fr) li:nth-last-child(2)::after { content: ", et " } ol.inline:lang(fr) li:nth-last-child(2):first-child::after { content: " et " } ol.inline li:last-child::after{ content: "" }
Received on Thursday, 18 December 2003 12:13:31 UTC