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

RE: [css3-text] word-break vs line-break

From: Koji Ishii <kojiishi@gluesoft.co.jp>
Date: Tue, 4 Dec 2012 20:14:15 -0500
To: Makoto Kato <m_kato@ga2.so-net.ne.jp>, "www-style@w3.org CSS" <www-style@w3.org>
Message-ID: <A592E245B36A8949BDB0A302B375FB4E0DA44ED800@MAILR001.mail.lan>
> Although word-break property vs line-break property is conflict the function for
> breaking per line, which property is high priority?

Both properties prohibits line breaking at specific places for different purposes so they don't conflict, except word-break:break-all which allows more breaks than regular line breaking opportunities. The resolution for the case is already in the spec as[1]:

  lines may break between any two letters (except where forbidden by the ‘line-break’ property)

> Ex 1. Should we break all characters by work-break: break-all?
> (should we ignore line-break?)
> div {
>   word-break: break-all;
>   line-break: strict;
> }

As above, it means lines may break between any two letters except where line-break:strict forbits.

> Ex 2. Should we don't break CJK characters by word-break: keep-all?
> (should we ignore line-break?)
> div {
>   word-break: keep-all;
>   line-break: loose;
> }

Both keep-all and line-break:loose defines where lines should not break, so they don't conflict. The two sets of prohibiting line break opportunities should be unioned.

Hope this resolves your concerns.


[1] http://dev.w3.org/csswg/css3-text/#break-all


Received on Wednesday, 5 December 2012 01:14:51 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:06 UTC