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

> 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.


Regards,
Koji

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

CSS-ISSUE-292

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