W3C home > Mailing lists > Public > www-style@w3.org > November 2008

Re: [CSS2.1] Position of list-item markers

From: Jethro Larson <jethrolarson@gmail.com>
Date: Fri, 14 Nov 2008 19:24:25 +0000
Message-ID: <a9b1b1f20811141123x7bd6e8cfm90b9fcf6b70f11ae@mail.gmail.com>
To: www-style@w3.org
I've always felt uneasy with the way list markers work. Generally it's a bad
idea to have a bunch of special cases, so it would probably be advantageous
to describe the font marker in another manner.

Essentially the marker is a pseudo-element, right. So lets see if we can
describe it with other CSS that can be more flexible. Once we do that, the
list-style property can just be a shortcut to those properties.

Here's something I tried to loosely replicate the list marker. Works best in
Firefox 3.

li{list-style:none;}
li:before{
  content: 'o';
  display: inline-block;
  position: absolute;
  margin-left: -15px;
  margin-right: 8px;}

<ul>
  <li>text</li>
  <li>text</li>
</ul>

Obviously it's a hacky example, but describing the list marker with other
css properties may help us nail down it's behavior, and make the spec easier
to understand as well as implement.
Received on Wednesday, 26 November 2008 13:15:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:17 GMT