RE: :first-letter and bidi reordering interaction

> From: Boris Zbarsky [mailto:bzbarsky@MIT.EDU]
> An interesting question that came up [1] was what should 
> happen in the 
> following situation:
> 
> Stylesheet:
>    p { color: red; direction: ltr }
>    p:first-letter { color: green }
> 
> DOM:
>    <p>"YERUSHALAYIM" is the Hebrew word for "Jerusalem."</p>
> 
> (where YERUSHALAYIM is actually in Hebrew).
> 
> In this case, after bidi reordering we have:
> 
> Boxes:
>    <p>"MIYALAHSUREY" is the Hebrew word for "Jerusalem."</p>
> 
> where the quote that comes next to the "M" is the one that 
> came next to 
> the "Y" in the DOM.
> 
> So in this case, what should be green, exactly?  And why?  In the 
> absence of bidi reordering the initial '"' and the 'Y' would 
> be green, 
> but in this case that seems a little bizarre.... though implied by a 
> literal interpretation of the fictional tag sequence language 
> in the spec.
> 
> -Boris

What does your [1] refer to?
The bracketed content below should be green:
<p>"MIYALAHSURE[Y"] is the Hebrew word for "Jerusalem."</p>

Why?  Because although Hebrew is written right-to-left, the concept of
"first-letter" remains the same.  This might look funny on the page, but
that's a direct consequence of mixed-direction text.  Things like this are a
good reason to render a line break between every change-of-direction, which
helps users out a bit.

Matthew.van.Eerde@hbinc.com                805.964.4554 x902
Hispanic Business Inc./HireDiversity.com   Software Engineer
perl -e"print join er,reverse',','l hack',' P','Just anoth'"

Received on Monday, 19 April 2004 16:55:51 UTC