Re: [csswg-drafts] [css-text-3] word-wrap/overflow-wrap: break-word should affect min-content

In summary, I think the best thing to do is to add a new value to `overflow-wrap`, probably called `anywhere`, that does the same thing as `overflow-wrap: break-word`, except it affects the intrinsic size.

This has the following advantages:

* It is what overflow-wrap:break-word should always have done, even though we cannot change that due to compat
* even though most of the properties and values related to line breaking are terribly named, `overflow-wrap: anywhere` is actually a pretty reasonable name for what it does: it lets the line wrap anywhere when there would be overflow.
* The value name `anywhere` draws a parallel to `line-break: anywhere`, which is a good thing, since they allow the same breaks, the only difference being the priority (line-break allows the break always, overflow-wrap only when things would otherwise overflow).
* It is possible to use `overflow-wrap:anywhere` in combination with the various i18n focused values of `word-break`, which is good because conceptually these are completely unrelated.

The alternative would be to specify the existing proprietary `word-break:break-word`. This is easiest since some implementations have it, but this value really does not belong in this property, so this is confusing to teach/learn and problematic to use, since it gets mixed with another property that has unrelated uses.

And if the compat situation is really bad (I think it might not be, given that Firefox and Edge have managed to resist the temptation to implement so far), we should probably just do both.

-- 
GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2682#issuecomment-431503466 using your GitHub account

Received on Friday, 19 October 2018 21:24:08 UTC