W3C home > Mailing lists > Public > www-style@w3.org > July 2011

Re: [css3-lists] Published as WD!

From: Aharon (Vladimir) Lanin <aharon@google.com>
Date: Thu, 21 Jul 2011 12:22:08 +0300
Message-ID: <CA+FsOYZUfCySHZnV3-POySRa5+=7bzrwtUK5zBooTfWie+fiUQ@mail.gmail.com>
To: Øyvind Stenhaug <oyvinds@opera.com>
Cc: www-style@w3.org
>> 1. For a list-item-position:outside list item, the content of a marker
>> is in a separate paragraph for bidi purposes. Its paragraph direction
>> is taken from the list container's direction.

> The spec seems to be missing details on how this is supposed to work.

> The spec didn't have these details, but it does now.

I had assumed that this was implied by the spec's statement that the
list-item-position:outside list item puts the marker in a "separate
marker box". I am glad it has been spelled out.


>> 2. For a list-item-position:outside list item, the marker box is
>> horizontally flush against one side of the list item box. It is the
>> "start" side relative to the list container's direction. Thus, the
>> list item's text-align affects the position of both the list item and
>> the marker.

> the list item's text-align has no effect on the position of the marker.

I am very happy to hear that I misunderstood this! Thus, just to make
absolutely sure,

<ol><li>hi</li><li style="text-align:right">bye</li></ol>

will produce something like this:

1. hi
2.                        bye

? (I am hoping that the answer is yes.)


>>> 4. Under the current proposal, is there currently any way to get the
>>> marker placed horizontally flush against the "start" side relative to
>>> the *list item*'s direction, as list-item-position:hanging would have
>>> done? Sometimes, apparently, people do want the markers to switch
>>> sides in a mixed-direction list.

>> No.  I did have a 'hanging' value that would do this, but we dropped
>> it due to lack of use-cases.

> s/we/I/ since that was not a WG decision. Note also that we have explicit
> resolutions on this exact issue stating that "list-item-position: outside"
> places the marker on the start side of the list-item based on the list-item's
> directionality.

We all agree that in most cases, users want a list to come out *by
default* with the marker on the start side of the list-item based on
the list's (not the list item's) directionality. The reason for the
(contradicting) decision above was backward compatibility in a case
where the browsers do show interoperability. *However*, that decision
came together with the strong hope that the HTML default style sheet
would come to the rescue and define its own default (different from
the CSS default) that would base it on the list's direction, as the
user actually wants. I can live with that, but the thing is that HTML5
is in Last Call, and if we need it to say something about li in its
default stylesheet, *this is the time to do it*. So, either:

a. We decide, *now*, that the CSS default is going to wind up being to
base the marker's position on the list's direction, in which case the
HTML5 default stylesheet does not have to say anything.

b. Or, if we can not come to such a decision, we decide, *now*, what
the final syntax is going to be to base the marker's position on the
list's direction, and get that into the HTML5 default stylesheet,
*now*.

>> Can you give examples of places where people actually want
>> [list-item-position:hanging], or the behavior is clearly reasonably
>> attractive?

Originally, I was convinced that no one would want it. And to this day
I have never met a Hebrew speaker who wanted that layout. In fact, the
Arabic and Farsi speakers with whom I have talked about it had no use
for it either. However, someone once sent me a URL to a scan of an
Arabic book page actually using this layout. Unfortunately, that URL
no longer works... Thus, although I no longer have a real live
example, I have a nagging feeling that there will someday be someone
who wants it. But it must not be allowed to remain the bottom-line
default that the user gets!


>>> 5. Is there any objection to HTML5 specifying in the default style
>>> sheet li {text-align:match-parent;}? I have suggested this in the
>>> past, and http://www.w3.org/Bugs/Public/show_bug.cgi?id=10824 is still
>>> open for this purpose.

>> Is this actually required anymore?  Outside markers now pay attention
>> to the parent's direction without relying on text-align at all (it's
>> part of the details of "position:marker").  Was there any other
>> use-case for match-parent?

There definitely is a use case. For short list items in a wide
available area, match-parent definitely gives a neater appearence.
Compare:

a. herring
b. lox
c. HSIFETIHW

and

a. herring
b. lox
c.                                                        HSIFETIHW

Nevertheless, for long list items that span several lines, and
especially if the available area is narrow, "start" is best.

> Note that he wrote 'text-align: match-parent', which has very little to do
> with the list marker's position. Different issue. I don't see a problem
> with this suggestion, but it's not a css3-lists issue. It's an HTML5/CSS3
> Text issue.

True. I was working on the misconception that the latest decision had
been to make text-align affect the marker.

In any case, it would be helpful to come to a decision about li
text-align. I have a bug open on HTML5 currently asking to change it
to match-parent. If that's a good idea, a comment stating that
www-style likes it will help make it happen. And if it isn't a
particularly good idea, I should close that aspect of the bug.

>>> 6. Given that markers are often counters with strong-directional
>>> contain (e.g. Latin letters), it is important that
>>> list-item-position:inside marker content be isolated for bidi purposes
>>> from what follows it in the list item, at least by default. Should
>>> this be done by making unicode-bidi:isolate be the default for
>>> ::marker?

>> I don't have any problem with it.  Do inside list markers currently
>> affect bidi resolution in browsers?  I don't know enough about bidi to
>> really test this.

> Here's my attempt:
>
> <!doctype html>
> <title>Bidi isolation of inside list marker</title>
> <ol dir="rtl" style="list-style: upper-alpha inside">
>   <li>B</li>
> </ol>
>
> In Gecko, Presto and WebKit it looks like
>
> B .A
>
> which is what would happen with unicode-bidi:isolate on the marker, if
> I understand correctly. In IE8 it looks like
>
> A.B

You understand correctly, and indeed IE8 has it as you show it, which
is bad. BTW, if you take out the <!doctype html>, IE8 does it like the
others. Hurray for quirks mode...


On Wed, Jul 20, 2011 at 2:14 PM, Øyvind Stenhaug <oyvinds@opera.com> wrote:
> On Tue, 19 Jul 2011 20:57:07 +0200, Tab Atkins Jr. <jackalmage@gmail.com>
> wrote:
>
>>> 6. Given that markers are often counters with strong-directional
>>> contain (e.g. Latin letters), it is important that
>>> list-item-position:inside marker content be isolated for bidi purposes
>>> from what follows it in the list item, at least by default. Should
>>> this be done by making unicode-bidi:isolate be the default for
>>> ::marker?
>>
>> I don't have any problem with it.  Do inside list markers currently
>> affect bidi resolution in browsers?  I don't know enough about bidi to
>> really test this.
>
> Here's my attempt:
>
> <!doctype html>
> <title>Bidi isolation of inside list marker</title>
> <ol dir="rtl" style="list-style: upper-alpha inside">
>   <li>B</li>
> </ol>
>
> In Gecko, Presto and WebKit it looks like
>
> B .A
>
> which is what would happen with unicode-bidi:isolate on the marker, if I
> understand correctly. In IE8 it looks like
>
> A.B
>
> --
> Øyvind Stenhaug
> Core Norway, Opera Software ASA
>
>
Received on Thursday, 21 July 2011 09:23:03 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:42 GMT