W3C home > Mailing lists > Public > public-css-archive@w3.org > April 2017

Re: [csswg-drafts] [css-text-3] word-break: break-all doesn't break before sentence-ending punctuation if UAX #14 is used

From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
Date: Thu, 20 Apr 2017 01:04:04 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-295522963-1492650243-sysbot+gh@w3.org>
The CSS Working Group just discussed word-break: break-all doesn't break before sentence-ending punctuation if UAX #14 is used, and agreed to the following resolutions:

```
RESOLVED: put an issue in the spec for overflow: wrap to apply regardless of whitespace
```

```
RESOLVED: add line-break: break-all to the spec
```

<details><summary>The full IRC log of that discussion</summary>

```
<astearns> topic: word-break: break-all doesn't break before sentence-ending punctuation if UAX #14 is used
<astearns> github topic: https://github.com/w3c/csswg-drafts/issues/1171
<rachelandrew> florian: there are many variations on how to wrap text, one thing is wrap everywhere, get to the end of the line break and do a new one
<rachelandrew> florian: the main difference between this and word-break: break-all is that it allows wrapping points between letters but not punctuation
<rachelandrew> break between letters just like CJK
<rachelandrew> fantasai: this one is for Japanese
<rachelandrew> florian: this doesn't do what you want if you want the terminal wrapping
<rachelandrew> fantasai: right now the word-wrap property acts on letters and symbols not punctuation
<rachelandrew> the line-break property deals with punctuation rules
<rachelandrew> so we have logical separation of the two properties
<rachelandrew> adding a new value to word-break is weird as that isn't what it does
<rachelandrew> so we might want to add a value somewhere, maybe line-break: break-all
<rachelandrew> florian: the alt way to approach that is the overflow-wrap property, if things do overflow and you do overflow-wrap: break-word it allows the overflow to be anywhere
<rachelandrew> fantasai: overflow-wrap says pick some arbitrary place near the end of the word to wrap
<rachelandrew> florian: writes on the whiteboard
<rachelandrew> fantasai: so make overflow-wrap word regardless of the white-space value
<rachelandrew> it does make sense that overflow-wrap is allowed to apply as this is basically emergency breaking
<rachelandrew> we might also want to add a break-all value
<rachelandrew> we should add line-break: break-all and also make overflow wrap apply regardless of the white-space value
<rachelandrew> fantasai: I think that both behaviours are useful
<rachelandrew> koji: why do we need two things to do the same thing?
<myles__> rachelandrew: he is "koji"
<myles__> Ah ok you got it :)
<rachelandrew> fantasai: currently overflow-wrap can allow breaking or non-breaking of a word
<rachelandrew> this doesn't change your intrinsic sizing
<rachelandrew> the other properties actually change the line-breaking rules
<rachelandrew> I think the behaviour you would get for adding line-break is different to the behaviour you will get from overflow-wrap
<rachelandrew> we need a value that says break all, everthing. But we might also want to set the intrinsic size according to normal line breaking rules
<rachelandrew> koji; I think people want to change the intrinsic size, but not to change overflow behaviour
<rachelandrew> iank_ what about properties that override intrinsic sizes
<rachelandrew> fantasai: this is about how we calculate the size of overflow text
<rachelandrew> florian: we want t least one of the two
<rachelandrew> fantasai: we definitely need line-break: break-all
<rachelandrew> astearns: I have concerns about overflow
<rachelandrew> fantasai: I think we can resolve on the one, we should keep in mind the other question whether overflow should wrap regardless of white space
<rachelandrew> astearns: resolve to put an issue in the spec for overflow: wrap to apply regardless of whitespace
<astearns> RESOLVE: put an issue in the spec for overflow: wrap to apply regardless of whitespace
<astearns> RESOLVED: put an issue in the spec for overflow: wrap to apply regardless of whitespace
<rachelandrew> to add a value to line break that will say break anywhere with regards to punctuation
<rachelandrew> fantasai: then maybe add a shorthand to make this easier
<rachelandrew> fantasai: break-all is one possibility, anywhere is another possibility
<rachelandrew> koji: it's strange because line-break is a CJK property
<rachelandrew> fantasai: line-break is a property for different levels of punctuation strictness in different languages
<rachelandrew> florian: they forbid line breaking in various places
<rachelandrew> fantasai: word-break does letters and symbols, line-break does punctuation
<rachelandrew> astearns: so to get the terminal effect you would set line-break and word-break to break-all
<rachelandrew> koji: if we were to respond to original request it is easy, it is just to change one thing
<rachelandrew> break-anywhere is easy, break anywhere at punctuation is a new thing
<rachelandrew> myles_: we would implement it at the system level
<rachelandrew> webkit doesn't want to be in the business of understanding all this stuff
<myles__> fantasai: https://github.com/w3c/csswg-drafts/issues/1252
<rachelandrew> koji: in Android we define the priority of which to support and cut some of them
<rachelandrew> this new mechanism is more complex
<rachelandrew> fantasai: I think it would be worth finding out if the combination is needed in Chinese (don't break a Latin word but break punctuation anywhere)
<rachelandrew> florian: I think the Japanese style of document, do English words get broken
<rachelandrew> koji: it does get broken
<rachelandrew> fantasai: if we find out if we need to add it then we just need to pick a syntax
<astearns> action xidorn to see if the case where you break at punctuation but not through english words is used in Chinese
<trackbot> Error finding 'xidorn'. You can review and register nicknames at <http://www.w3.org/Style/CSS/Tracker/users>.
<astearns> based on that result, solve this issue with break-line: break-all (that allows that) or with a solution that breaks everywhere including punctuation
<rachelandrew> fantasai: I'm leaning to the syntax being line-break: break-all
<rachelandrew> we have to pick a property, and line-break already effects some letters word-break does not deal with punctuation
<rachelandrew> astearns: can we resolve to put line-break: break-all in the spec for the purpose of the terminal use case, if it does that use case only or if it does it with the other property depends on investigation
<rachelandrew> RESOLVED: add line-break: break-all to the spec
```
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1171#issuecomment-295522963 using your GitHub account
Received on Thursday, 20 April 2017 01:04:15 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:11 UTC