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

Re: [CSSWG] Your opinion needed : Position of list-item markers

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 26 Nov 2008 21:00:13 -0600
Message-ID: <dd0fbad0811261900l41b8a48ax5efb2af95473dd42@mail.gmail.com>
To: "L. David Baron" <dbaron@dbaron.org>
Cc: "Daniel Glazman" <daniel.glazman@disruptive-innovations.com>, "www-style@w3.org" <www-style@w3.org>

On Wed, Nov 26, 2008 at 6:04 PM, L. David Baron <dbaron@dbaron.org> wrote:
> On Wednesday 2008-11-26 17:50 -0600, Tab Atkins Jr. wrote:
>> (Also, authors who don't use CSS at all won't suffer either way from
>> this decision, because you can't text-align without CSS.  Authors who
>> know a little bit of CSS will find that the problem is trivial to fix
>> and well within their skill level and capability when they ask around
>> on forums or read blog posts or just poke around a bit by themselves.)
> <img align="left">
> <ul>
>  <li>Hi!</li>
> </ul>

Boris filled me in on what *I* was missing on this example (I've never
seen @align used like that before).

So this question is asking about how markers interact with floats, in
essence.  I know there have been some significant discussions on this
matter recently, but I also know that I've only skimmed those, because
they felt too esoteric for me to meaningfully contribute (every time I
thought I might be able to say something intelligent, someone brought
up a point about a floating table or something which pulled the
situation out of my grasp again).

Obviously, in my proposal the outside list marker is either just
within the <li> box but outside of the line box, or just outside of
the <li> box.  I speak out of ignorance of how browsers currently
handle this and what the ideal rendering is, but it *seems* to me
that, in either situation, there's still an additional line box
surrounding the bullet, which would be pushed away from the float,
thus also shoving the inline text.  Thus you'd still have visible
bullets next to a float even with an outside list marker (if this is
undesirable for whatever reason, the old standby of replacing the
markers with background images on the <li>s will more-or-less work,
hiding the markers underneath the float).

An inside list marker will be within the <li>'s text's line box, and
thus of course will be shoved by the float.

A quick survey of the four browsers on my comp shows *almost* complete
agreement.  It appears (correct me if I'm wrong) that the outside
marker is a box (no line box, or at least none that pay attention to
floats) attached directly the edge of the <li>'s text's line box.
Uniformly, the edge of the text's line box juts up against the edge of
the picture, and the marker then intrudes on the picture itself.  The
only point of disagreement is that IE7 puts the marker below the
picture (I can see it due to some transparency) while everyone else
puts it above.

In my mind this is suboptimal, and I suppose it's only due to
simplicity that they act that way.  Markers aren't *quite* text, but
they certainly act like it, and are uniformly generated from character
glyphs (correct me if I'm wrong here) and respond to most properties
like text does (color, font-size, etc.).  If they had a linebox of
their own, it would handle this case much better.

Regardless of my opinions on the uselessness of this particular
rendering detail, though, I don't believe it affects my opinion.  I
will assume that the marker is outside of the linebox but attached to
its edge, which I believe still works just fine in the
text-align:center case.

(I'm foggy on the effects of text-align on the dimensions of a line
box, though.  Does it still fill the whole line?  Does it shrinkwrap
the text?  This detail obviously affects what I'm talking about.  As
well, it's possible that an outside marker is just an inside marker
with a bit of an offset, and thus still lives within the text's
linebox.  Do the browsers treat it like that?)

~TJ
Received on Thursday, 27 November 2008 03:00:48 GMT

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