Re: :first-word

www-style-request@w3.org wrote:
> 
> --- Tim Bagot <tsb@earth.li> wrote:
> > On Thu, 2 Dec 1999, Matthew Brealey wrote:
> >
> > > Why isn't :first-word in the selectors WD?
> >
> > The problem is in defining what a word is in a way
> > that works in all
> > languages. It probably could be done given
> > sufficient effort.
> 
> UAs are already required to define a word for
> word-spacing.
> 
> However, the wd should state that UAs should apply
> :first-word in a language specific way.

For a language like Japanese, which has distinct
words but no spacing between them, it would make
sense to define :first-word separately from
word-spacing.

> At the very least, it could say that for Western
> European languages, it should apply them - even
> something that only works for English, French, German,
> Spanish, Greek, etc., is of use for hundreds of
> millions of people, and by leaving the option to the
> UA to have a language-specific approach, it is easily
> extendable.

I agree that it is fairly easily defined for
W.European languages. Not so sure about the
"leaving it to the UA" bit.

> Alternatively, the UA could define a word as
> everything between spaces (of whatever kind, e.g.,
> including em space, non-breaking space, etc).
> 
> Although this would not necessarily be appropriate in
> all languages, presumably if you don't like this
> approach, you don't use :first-word (in any case, I
> would imagine that :first-word would be less useful in
> such languages any way).

I've seen this sort of effect used with Japanese
text, so don't be so sure. (Sorry, no references,
but I've seen it a few times while browsing through
Kinokuniya bookstore).

-- 
When a cat is dropped, it ALWAYS lands on its feet; and when toast is
dropped, it ALWAYS lands with the butter side down. Therefore, I propose
to strap buttered toast to the back of a cat. When dropped, the two will
hover, spinning inches above the ground, probably into eternity. A
buttered-cat array could replace pneumatic tires on cars and trucks, and
giant buttered-cat arrays could easily allow a high-speed monorail to
link New York with Chicago.
(please remove __ from address to reply)

Received on Friday, 3 December 1999 14:56:26 UTC