Re: [css2.1] :first-line behvior

On 19/03/2008, fantasai <fantasai.lists@inkedblade.net> wrote:
> <p>This is a one-sentence <em>paragraph that
>  has two lines</em> of text.</p>
>
>  p::first-line em { display: block; }
>
>  is one reason I can think of.

I accept the standard as-is. But how are we supposed to describe, say,

p:first-line { font-family: Arial, Helvetica, sans-serif; }
p:first-line *[lang=zh] { font-family: "MS Hei", sans-serif; } /* invalid */
<p lang=en>Foo bar <span lang=zh>一二三四五六</span> baz ...</p>

where the Chinese (or other non-English) character would be inside the
pseudo-element? And let's say the Chinese might have been broken in
half in the middle so styling the Chinese using a separate rule would
not work.

IMHO this is a very real problem, since Chinese characters are often
rendered using inappropriate fonts when the browser is left to decide
on its own what's appropriate; I can imagine other non-Latin languages
can run into similar problems.

-- 
cheers,
-ambrose

The 'net used to be run by smart people; now many sites are run by
idiots. So SAD.

Received on Wednesday, 19 March 2008 21:45:37 UTC