W3C home > Mailing lists > Public > www-style@w3.org > March 2011

Re: [css3-text] Proposed pruning & scoping of hyphenation properties

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 30 Mar 2011 10:29:29 -0700
Message-ID: <4D936879.5060701@inkedblade.net>
To: Christian Stockwell <cstock@microsoft.com>
CC: Alex Danilo <alex@abbra.com>, "www-style@w3.org" <www-style@w3.org>
On 03/30/2011 10:03 AM, Christian Stockwell wrote:
>
>>> If that's the case, it seems like we've already solved this problem
>>> through the use of the hyphenation-limit-zone property (e.g. set the
>>> hyphenation zone width to be 99% and authors may have a solution to this
>> corner case).
>>
>> That's an interesting hack. :) We'll have to ask the working group if they
>> prefer that.
>
> I disagree with the assertion that this is a hack--it is the logical limit
> of a property we've defined, used precisely as specified. In the "99%" or
> "100%" case the designer is simply saying that she wants hyphenation to
> occur only if a word begins at the very beginning of the line and does not
> fit on the line (which is exactly the behaviour we want, and exactly what
> she would expect based on the description of hyphenation-limit-zone).

100%, ok, but 99% is a hack because it only works as expected if there is no
breakpoint in that last 1%.

> The additional benefit of this approach is then a designer can combine
> hyphenation with word-wrap: break-word to prioritize hyphenation, but
> if no hyphenation exists wrap the word to avoid overflow.

The syntax definition of 'word-wrap' is
   word-wrap: normal | [ break-word || hyphenate ]
which means you can write
   word-wrap: hyphenate break-word;

So this isn't particularly a concern.

> I think we need to resolve this problem within the hyphenation properties
> themselves anyway. For example, suppose an author specifies a set of
> properties that are mutually exclusive--for example, a very narrow
> hyphenate-limit-zone (requiring that UAs try to hyphenate a word at the
> end of the line) and a very large hyphenate-limit-word--throwing out all
> possible hyphenation opportunities. In the end only one of those
> requirements can be respected.

If the author specifies limits that result in no allowed hyphenation points,
then I expect they get no hyphenation.

~fantasai
Received on Wednesday, 30 March 2011 17:30:05 GMT

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