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

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

From: Koji Ishii <kojiishi@gluesoft.co.jp>
Date: Mon, 7 May 2012 14:31:40 -0400
To: Ambrose LI <ambrose.li@gmail.com>, "Kang-Hao (Kenny) Lu" <kennyluck@csail.mit.edu>
CC: fantasai <fantasai.lists@inkedblade.net>, WWW Style <www-style@w3.org>
Message-ID: <A592E245B36A8949BDB0A302B375FB4E0D3C3C8146@MAILR001.mail.lan>
>>> But since we are talking about CJK here, I *think* I have asked this
>>> same question before too, but maybe I should ask again: Suppose we
>>> have the following example sentence:
>>> 我們今次的例會邀請到陳大文教授講解公共交通的重要性。
>>> and we want the following (where each • denotes a possible break point):
>>> 我們•今次•的•例會•邀請•到•陳大文教授•講解•公共交通•的•重要性。
>>> I expect keep-all to be able to accomplish this, but for some reason I
>>> remember being told that this is not in fact the case. The explanation
>>> in http://dev.w3.org/csswg/css3-text/ seems to neither confirm nor
>>> deny this. Is clarification needed for keep-all, or have I missed
>>> something obvious?
>> Suppose you have a segmentation program that can insert zwsp(s) at word
>> boundaries well, you could do that as a preparatory step and you should
>> be able to keep words from breaking with 'word-break: keep-all'.

This should work, and

> What if we applied word-break: keep-all to just a few selected
> parts of the sentence (say just to prevent the personal name
> from breaking)? I would expect that to work (without any zwsp).
> If that’s not supposed to work then I think the text for explaining
> keep-all would need a fair bit of rewriting. 

Yes this is supposed to work too.

I don't remember you asked last time, sorry about that, it doesn't work if you just apply word-wrap to whole sentence, but either of above should work. For latter case, you should also be able to do this by the text-wrap property or the white-space property.

Received on Monday, 7 May 2012 18:35:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:16 UTC