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

Re: ::first-word pseudo-element

From: David Storey <dstorey@opera.com>
Date: Sun, 12 Dec 2010 18:06:54 +0200
Cc: Pierre Bertet <bonjour@pierrebertet.net>, www-style list <www-style@w3.org>
Message-Id: <B3370A7D-D39A-4016-A5B8-55F2AA85E798@opera.com>
To: John Hudson <tiro@tiro.com>

On 11 Dec 2010, at 23:28, John Hudson wrote:

> Pierre Bertet wrote:
> 
>> 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.
> 
>> So my questions are:
>> This section could it not be used to clarify what a “word” is?
> 
> The extensive caveats in the notes to that section of TUS Annex #29 would need to be taken into account. Word boundary identification needs to be tailored for many languages, and the basic Unicode mechanism only aims to provide 'as workable a default as possible’.

True, but isn’t "'as workable a default as possible” better than not having support at all for whatever usecases first-word would bring (I’ve seen stylistic treatment of the first word a number of times in magazine layout).
> 
> 
> Words -- and syllables, which present similar issues for selecting appropriate text elements for styling -- are units of spoken language that may or may not be easily isolated as units in written language, depending on particular writing systems as applied to particular languages. In some systems, e.g. Thai, word selection is only possible with dictionary support.

True to do it properly you need a dictionary for languages such as Thai, but don’t browsers already have to work out word boundaries in languages to be able to do word wrapping properly anyway? For instance Opera doesn’t do line breaking properly for Thai yet, but we are working on adding this. We’ll need to either add a dictionary or use an algorithmic approach to support line breaks in the correct place anyway. Maybe it is more complex to detect just a first word than the word/line wrapping though?

> 
> 
> JH
> 

-- 
David Storey

Chief Web Opener / Product Manager, Opera Dragonfly
W3C WG:  Mobile Web Best Practices / SVG Interest Group 

Opera Software ASA, Oslo, Norway
Mobile: +47 94 22 02 32 / E-Mail/XMPP: dstorey@opera.com / Twitter: dstorey
Received on Sunday, 12 December 2010 16:07:09 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:35 GMT