Re: [csswg-drafts] [css-text-3] word-break:keep-all and overflow (#4286)

The CSS Working Group just discussed `word-break:keep-all and overflow`.

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> Topic: word-break:keep-all and overflow<br>
&lt;TabAtkins> florian: In langs like English, word-break:keep-all is same as normal<br>
&lt;astearns> github: https://github.com/w3c/csswg-drafts/issues/4286<br>
&lt;TabAtkins> florian: In Japanese, it suppresses a lot of wrapping opportunities. (Not quite all, but most.)<br>
&lt;TabAtkins> florian: So if you have a very short measure of text, you might have a small sequence of text without break opportunities.<br>
&lt;TabAtkins> florian: Currently ther'es a provisio in the spec that the UA may reproduce the suppressed wrapping oppo to reduce overflow.<br>
&lt;TabAtkins> florian: I think this is good, but the "may" isn't. We should harmonize on should or must if we want to do this.<br>
&lt;TabAtkins> florian: An example of this is a title or figcaption, a short piece of text.<br>
&lt;TabAtkins> florian: People tend to like it not breaking anywhere in Japanese.<br>
&lt;TabAtkins> florian: But if the amount of space is small enough that it woudl cause overflow, they'll prefer it to break anyway.<br>
&lt;TabAtkins> myles: This value is for Korean, right?<br>
&lt;TabAtkins> florian: It's frequently used for Korean, but it's also useful for other CJK langs.<br>
&lt;TabAtkins> florian: Any lang that allows breaking at syllable/char boundaries can use this to opt into a less free-form style.<br>
&lt;TabAtkins> myles: Right, just if Korean use is most common for this, we should see what Korean native speakers prefer.<br>
&lt;TabAtkins> koji: I'd prefer this be explicit, so it happens only when authors opt in, like overflow-wrap.<br>
&lt;TabAtkins> koji: If you want overflow-wrap to not break at specific points, that might be the feature you want. I don't see much different from keep-all in English case.<br>
&lt;TabAtkins> koji: If it's useful for Korean it's probably useful for English.<br>
&lt;TabAtkins> florian: Difference between like-English and break-all is that in English, there's no real context where breaking anywhere is acceptable. But other langs, that is the default.<br>
&lt;TabAtkins> florian: So falling back to that behavior in those langs that opt into keep-all is possibly reasonable, while it's not in English.<br>
&lt;TabAtkins> myles: What about overflow-wrap:anywhere?<br>
&lt;TabAtkins> florian: This isn't actually anywhere, tho.<br>
&lt;TabAtkins> myles: Maybe break-word?<br>
&lt;TabAtkins> florian: break-word and anywhere are identical except for intrinsic sizes.<br>
&lt;TabAtkins> florian: But maybe we could have a fourth value, that says that if keep-all, it still falls back to breaking anywhere if necessary.<br>
&lt;TabAtkins> myles: Right, my question is just if we need a new value, or if the existing values are enough and we just specify their interactions a little different.<br>
&lt;TabAtkins> koji: In my mind, the two variants of Korean linebreaking are just variants; keep-all is normal behavior.<br>
&lt;TabAtkins> koji: Even in English or German, if you have a tiny space to lay out in, you might still want a break going anywhere.<br>
&lt;TabAtkins> florian: My proposal is *not* to allow breaks before commas, etc. Those are disallowed in 'normal'. My proposal is that, in these restrained-size situations, revert keep-all to acting like normal.<br>
&lt;TabAtkins> koji: I understand. but this value is already to suppress this situation from happening in Korean. But I think we want to fix all languages.<br>
&lt;TabAtkins> florian: We have this in german/english/etc by using hyphenation, with "" for the hyphenation character.<br>
&lt;TabAtkins> koji: Ok, so say English text has a very long word, and the author uses overflow-wrap:break-all to allow it to break. In that case it can break before a comma, which isn't ideal.<br>
&lt;TabAtkins> koji: I don't think we can change that, so we might want to add the fourth value.<br>
&lt;TabAtkins> myles: That's what break-word was supposed to do way back when Hyatt implemented it...<br>
&lt;TabAtkins> koji: word-break can be commonly used in an issue tracker, for example. But using it on English text is troublesome. overflow-wrap is more useful, but can do bad breaking.<br>
&lt;TabAtkins> myles: My overall point is that the linebreaking properties in the Text spec are already so complex and there are so many of them, that it will be hard to justify another one.<br>
&lt;TabAtkins> koji: Ok, well, I think this is basically the same as modifying keep-all.<br>
&lt;TabAtkins> florian: One action item is to ask Korean speakers, since they're a frequent user of this value, if it would be generally acceptable or if it would be weird.<br>
&lt;TabAtkins> florian: There seems to be a use-case to have it either way, but you're right, there is a big cost to adding new properties in this space.<br>
&lt;TabAtkins> florian: So we could defer the always-prevent value if it's going to be rare.<br>
&lt;TabAtkins> florian: It's just having the "may" that I think isn't terribly useful.<br>
&lt;TabAtkins> myles: Right, making a resolution now seems premature.<br>
&lt;TabAtkins> florian: Sure. That's enough feedback fo rnow.<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4286#issuecomment-531677806 using your GitHub account

Received on Monday, 16 September 2019 08:02:40 UTC