Bug 65381 - WebKit should support a defined word-wrap limit to prevent widows
: WebKit should support a defined word-wrap limit to prevent widows
Status: UNCONFIRMED
: WebKit
Text
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To:
:
: InRadar
:
:
  Show dependency treegraph
 
Reported: 2011-07-29 10:53 PST by
Modified: 2012-01-06 11:26 PST (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2011-07-29 10:53:27 PST
Webkit should support a defined word-wrap limit to give content authors control over widowed words. This is especially useful in cases where authors currently rely on forced breaks and creative spans for word spacing.

For example, the following would result in two or more words per line to prevent an widowed word.

p { -webkit-word-wrap-limit: 2; }

<rdar://problem/9861318>
------- Comment #1 From 2012-01-06 11:26:20 PST -------
"widows" in this context are usually referred to as Orphans, there is a discussion going on at www-style with regard to how this should be implemented. Please see: http://lists.w3.org/Archives/Public/www-style/2012Jan/0087.html for the beginning of the conversation. There are additional considerations, for example in typography it is usually the case that the entire paragraph will be re-flowed to avoid poor line lengths. That behaviour should be duplicated in CSS. e.g.,

NO ORPHAN CONTROL:
This is a paragraph of text that I'm going to
use to demonstrate a problem with orphan
control. The next word is supercalefragalistic
long.

BASIC ORPHAN CONTROL:
This is a paragraph of text that I'm going to
use to demonstrate a problem with orphan
control. The next word is
supercalefragalistic long.

TRADITIONAL MEDIA ORPHAN CONTROL:
This is a paragraph of text that I'm
going to use to demonstrate a problem
with orphan control. The next word is
supercalefragalistic long.

In existing traditional media the problem of poor line lengths after orphan control is tackled by the type layout application re-flowing the entire paragraph, adjusting letter-spacing, word-spacing and dropping problem words onto new lines. The particular method used is controllable in software to give different looks. Hyphenation is not usually used.