Re: per-paragraph auto-direction, a.k.a. dir=uba

On 09/02/2010 01:02 AM, Aharon (Vladimir) Lanin wrote:
> But, unless I misunderstand you, we have the problem I brought up
> originally, as in:
>
> <pre dir=uba>
>
> an ltr line (and thus uba paragraph).<input type=button
> value="b1" style="margin-start:20px" /><input type=button
> value="b2" style="margin-start:20px" />
>
> AN RTL LINE (AND THUS UBA PARAGRAPH).<input type=button
> value="B3" style="margin-start:20px" /><input type=button
> value="B4" style="margin-start:20px" />
>
> </pre>
>
> B3 and B4 would inherit the CSS direction of their parent, i.e. <pre
> dir=uba> element, which would be ltr due to the way its content
> begins. Will B3 and B4's margins be on their left or their right? If
> it's on the left, as per their CSS direction, they will not do what
> the author intends, which is to put a bit of space between the button
> and what precedes it. And if it's on the right, the definition of start
> and end becomes quite esotoric, no longer depending on the CSS
> direction, but on the paragraph direction, which scripts can't even access.

margin-start would be margin-left, since those input elements have
inherited an ltr direction. If the author wants proper control of
presentation, he should be using proper markup. Note that the lack
of spacing problem is present in

AN RTL LINE (AND THUS UBA PARAGRAPH).<input type=button
value="B3" style="margin-start:20px" /><input type=button
value="B4" style="margin-start:20px" /> MORE RTL TEXT

regardless of whether the paragraph direction is set correctly or not.

Note also that <pre> is not allowed to contain <input> elements.

Also, I should mention, it might make sense for dir=uba to be restricted
to <pre> and <textarea> elements (where it would do per-paragraph) and
to inline elements (where it would be the same as first-strong).

~fantasai

Received on Thursday, 2 September 2010 18:15:03 UTC