W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2020

Re: [csswg-drafts] [css-text-3] Why is anywhere a value of the line-break property, rather than the word-break property? (#5098)

From: r12a via GitHub <sysbot+gh@w3.org>
Date: Fri, 22 May 2020 10:03:35 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-632609747-1590141814-sysbot+gh@w3.org>
> IIRC, we did discuss that when setting this up, but went for line-break because the effects of word-break are limited to allowing / suppressing breaks within words, while line-break:anywhere also affects the break opportunities around punctuation, as do the other values of line-break.

Yes, but that's precisely why i find it confusing. I think you're relying on the switch to a different property to make a distinction which is more logical by choosing a different value of `word-break`.  In both cases it's about how words get broken, it's just a slight change in the rules from one to the other, so `word-break` is in my mind the intuitive place to look for the feature.  

Having to instead use a completely different property not only seems odd, but also requires you as an author to learn the differences and remember them, and use different constructs for what are really two small variations on the same thing: word-breaking.  

For example, imagine that you are Chinese and instead of your content using the default `word-break:break-all`setting  for line breaking you want to ignore the punctuation rules: i think you'd intuitively say to yourself, "Oh, i need a different value of `word-break` here.", but no you have to go off and use the `line-break` property. And then you begin to ask yourself, "so which value of `word-break` should i now be using?"  All you wanted to do was stop applying those punctuation rules.

If you remember, i had to ask in another issue whether i was doing the right thing for Ethiopic.  It wasn't immediately clear how `line-break:anywhere` was different from `word-break:break-all`, and i stlil have to make a mental effort to remember how to use them properly (although that's not helped either by the confusable naming of the `word-break` vs `line-break` properties, but that's now water under bridge). If they were both values of `word-break`, that would be much simpler to assimilate, partly because they are exclusive choices, and partly because what i'm trying to do is find the right basic line-breaking (read `word-break`) algorithm.


> Which browser doesn't have loose/normal/strict? I thought they all did now (possibly with some amount of bugs, but still)

Ah yes, i see that Gecko does now have support that matches Blink & Webkit, and i guess we can discount EdgeHTML. 

-- 
GitHub Notification of comment by r12a
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5098#issuecomment-632609747 using your GitHub account
Received on Friday, 22 May 2020 10:04:14 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:07 UTC