W3C home > Mailing lists > Public > www-style@w3.org > December 2010

Re: ::first-word pseudo-element

From: Karl Dubost <karld@opera.com>
Date: Sun, 12 Dec 2010 09:16:12 -0500
Message-Id: <3CD1589A-E577-4E45-9D4A-D8EE5D7E5B8E@opera.com>
Cc: www-style@w3.org
To: Pierre Bertet <bonjour@pierrebertet.net>

> But the ::first-letter already do this, defining a "letter", wich is
> not very clear too. To clarify this, the CSS3 Selectors spec refers to
> the Unicode Standard Annex #29 [1].
> This document seems very complex to me, but it also contains a “Word
> Boundaries” section, which seems to defines exactly that.

And the document says:

    This specification is a default mechanism; more
    sophisticated engines can and should tailor it for
    particular locales or environments. For example,
    good Thai, Lao, Chinese, or Japanese word-break
    boundaries require the use of dictionary lookup,
    analogous to English hyphenation.
    – http://www.unicode.org/reports/tr29/tr29-9.html

Which means you need the full dictionary of characters. I do not English hyphenation is really handled in browsers for the same reason (please, make me wrong here.).

Note that ::first-letter somehow is also misleading for asian languages such as Japanese and Chinese. Maybe it should have been ::first-char, but I guess it is too late. "::first-letter" was introduced I guess to mimic this old tradition of lettrines (Initial [1]). "Le charme suranné de l'écriture du monde physique".

"::first-chars-before-space" could work, but what would be the use case, which is the thing missing in this discussion, I think.

[1]: http://en.wikipedia.org/wiki/Initial

Karl Dubost - http://dev.opera.com/
Developer Relations & Tools, Opera Software
Received on Sunday, 12 December 2010 14:16:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:53 UTC