W3C home > Mailing lists > Public > www-style@w3.org > May 2012

Re: [css3-text] feedback on 'word-break: keep-all;'

From: Ambrose LI <ambrose.li@gmail.com>
Date: Thu, 3 May 2012 11:08:24 -0400
Message-ID: <CADJvFOXJZHgUTfbTVaCaU6iBbnqb8KfGGFhMFHEEqocr92YezQ@mail.gmail.com>
To: Jonathan Kew <jfkthame@googlemail.com>
Cc: www-style@w3.org
2012/5/3 Jonathan Kew <jfkthame@googlemail.com>:
> On 3/5/12 15:30, Ambrose LI wrote:
>> 2012/5/3 Kang-Hao (Kenny) Lu<kennyluck@csail.mit.edu>:
>>> The current prose for this is
>>>  # ‘keep-all’
>>>  #
>>>  #   Lines may break only at word separators and other explicit break
>>>  #   opportunities. Otherwise this option is equivalent to ‘normal’.
>>>  #   This option is mostly used where word separator characters are
>>>  #   present to create line-breaking opportunities, as in Korean.
>>> . This is certainly less vague than what was previous written (CJK text
>>> and non-CJK text, IIRC), but I have a question and a feedback:
>>> 1. What does "other explicit break opportunities" mean? forced breaks? I
>>> should note that IE9 breaks after hyphen even if "keep-all" is
>>> specified, is it following the spec? In any case, I think this should be
>>> the specced behavior as I think it's weird if 'word-break: keep-all' has
>>> side effect like this for Korean authors.
>>> 2. Word separators include nbsp but IE9 doesn't break at nbsp when
>>> "keep-all" is specified and I think nbsp should be excluded here.
>> Personally opinions here only, but breaking at hyphens
>> indiscriminately cannot be right. Even in English there are many
>> scenarios where indiscriminate breaking at hyphens is intuitively
>> wrong (short prefixes like e- or co-, phone numbers, unit or street
>> numbers in addresses, and so on), so I don’t know why IE does that.
> I think it's reasonable regard hyphen as an "explicit break opportunity" for
> the purposes of keep-all. It's widely expected that a line-break is
> permitted after hyphen; if this is not wanted, the user needs to take
> explicit action to prevent it (just as with inter-word spaces).

But then what is the purpose of keep-all then? If I just read that
description quoted above I’d assume it *is* the “explicit action” that
I needed.

Who would type “co-operate” or “e-mail” with non-breaking hyphens, or
phone numbers with non-breaking hyphens? I cannot imagine anyone doing
that. There are people who even type phone numbers with (breaking)
spaces in between. I don’t think treating the hyphen as a valid break
point is based on reality.

> Use U+2011 NON-BREAKING HYPHEN for hyphens that are not supposed to offer a
> break opportunity.

Rant: Web site developers really need to be educated in these issues.
There are sites (even some very big ones) that delete non-breaking
spaces or turn them into normal spaces. If we treated hyphens like
that the web can only get uglier.

-ambrose <http://gniw.ca>
Received on Thursday, 3 May 2012 15:08:54 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:14 UTC