Re: [css3-text-layout] New editor's draft - margin-before/after/start/end etc.

--------------------------------------------------
From: "Zack Weinberg" <zweinberg@mozilla.com>
Sent: Saturday, May 29, 2010 3:31 PM
To: "Andrew Fedoniouk" <news@terrainformatica.com>
Cc: "HåkonWiumLie" <howcome@opera.com>; <www-style@w3.org>
Subject: Re: [css3-text-layout] New editor's draft - 
margin-before/after/start/end etc.

> "Andrew Fedoniouk" <news@terrainformatica.com> wrote:
>>
>> I don't think that guessing :rtl or :ltr values by using particular
>> character runs is a good idea at all.
>>
>> E.g. there is a task of presenting file names or URLs in UI.
>> Think about file name in e.g. Hebrew but with ".htm" extension.
>> Usually this is treated as <div dir="ltr"> so overall directionality
>> is still LTR.  To be short: :ltr and :rtl are explicitly @dir based.
>>
>> Is this the answer?
>
> Yeah, that's the answer to the question I was asking.  Your proposal
> completely ignores what the Unicode bidi algorithm computes, and looks
> only at explicit attributes on HTML elements.

It does not.  @dir has nothing with bidi algorithm per se.

In my implementation defined 'dir' DOM attribute just sets values
of  :ltr, :rtl, :ttb "state flags" on the element and all its children.

And so called master style sheet ( similar to this one:
http://www.w3.org/TR/CSS21/sample.html ) does the following:

1) sets default value of the 'direction' property in CSS. Like this:
  *:rtl
  {
     direction: rtl;
     flow: default;
  }
  *:ttb
  {
     direction: ttb;
     flow: horizontal;
  }

2) defines initial margins/paddings for those elements that use them:

ul:rtl
{
   padding-left: 0 ;
   padding-right:  20px;
}

And that is all. All other processing is as it is now - nothing changes.

>
> It seems to me that this is almost certainly not what authors want,
> but I have no great experience with multi-language presentation, so I
> could be wrong.  My proposal would be ::ltr, ::rtl, ::ttb, etc
> pseudo-elements rather than pseudo-classes; they would match ranges of
> text that were resolved to be drawn in a particular direction,
> regardless of why the bidi algorithm made that decision, and they would
> ignore element boundaries.

If authors want to mix RTL/LTR for example they have to be clear
in their intentions and use these recommendations:
http://www.w3.org/TR/i18n-html-tech-bidi/#ri20030112.214820604

That is already there and used on the Web.

>
> (A difficulty with this is that you have to set things like margin on
> elements. Perhaps we could relax the "pseudo-element only at end"
> rule?  Then you could do
>
> ::ltr p ::first-line { padding-left: 2em }
> ::rtl p ::first-line { padding-right: 2em }
>
> for instance.  (In a world where padding on first-line actually did
> anything, of course.))
>

I am not sure I understand the purpose of your declaration above.
You want to make some paragraphs to use different paddings in the
same section of a document?  Is it real feature request or just hypothesis 
that
it might be needed?

-- 
Andrew Fedoniouk

http://terrainformatica.com
 

Received on Sunday, 30 May 2010 00:19:54 UTC