W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2018

Re: [csswg-drafts] [css-text] Handling 'widows' and 'orphans'. (#3473)

From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
Date: Sun, 30 Dec 2018 14:17:23 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-450563627-1546179442-sysbot+gh@w3.org>
There are already controls for widows and orphan lines and page/column breaks in https://drafts.csswg.org/css-break/#widows-orphans.

A control for widowed words on the last line could be useful, but it doesn't exist yet. However, I suspect it needs to be paired with a better line breaking algorithm than the current greedy one to achieve good results. If all the lines of the paragraph are re-balanced to  push the needed word(s) to the last line, all may be fine, but just pulling from the line before last is probably going to lead to sub-optimal results. Also, we'd need to figure out what this means in languages that do not separate words with spaces, such as Japanese or Chinese.

I suppose there's prior art in other software, and we should have a look at what they do there. InDesign maybe?

GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3473#issuecomment-450563627 using your GitHub account
Received on Sunday, 30 December 2018 14:17:25 UTC

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