Last Comment Bug 137367 - Implement orphans and widows
: Implement orphans and widows
Status: NEW
parity-Opera, parity-IE8, [parity-chr...
: css2, testcase
Product: Core
Classification: Components
Component: Layout: Block and Inline (show other bugs)
: Trunk
: All All
P4 enhancement with 52 votes (vote)
: Future
Assigned To: Nobody; OK to take it and work on it
: Jet Villegas (:jet)
Depends on: 132035 481826
Blocks: css2.1-tests css3-break
  Show dependency treegraph
Reported: 2002-04-14 03:53 PDT by Mikko Rantalainen
Modified: 2016-10-14 17:36 PDT (History)
31 users (show)
benjamin: blocking1.9.2-
benjamin: wanted1.9.2-
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

test case: orphans and widows (print) (17.67 KB, text/html)
2002-04-14 03:55 PDT, Mikko Rantalainen
no flags Details

Description User image Mikko Rantalainen 2002-04-14 03:53:09 PDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.9+) Gecko/20020412
BuildID:    2002041217

CSS2 properties orphans and widows
( are not implemented or
they don't simply work. Attached test case has p {orphans: 4; widows: 4; } but
neither have any effect.

Reproducible: Always
Steps to Reproduce:
1. Open attached test case
2. Select Print or Print Preview

Actual Results:  Mozilla breaks paragraph at the end of page no matter how many
lines there is.

Expected Results:  If there would be less than 4 lines at the end of page or
less than 4 lines at the beginning of the next page the entire paragraph should
be moved to next page.
Comment 1 User image Mikko Rantalainen 2002-04-14 03:55:15 PDT
Created attachment 79134 [details]
test case: orphans and widows (print)

You might need to tweak paragraph text to make page break to hit inside a
Comment 2 User image Boris Zbarsky [:bz] (still a bit busy) 2002-04-14 07:06:00 PDT
This is simply not implemented yet.
Comment 3 User image Kai Lahmann (is there, where MNG is) 2002-04-14 12:58:12 PDT
I thought I had reported this before.. hm
Comment 4 User image Christine Hoffman 2002-04-15 20:10:16 PDT
Changing QA contact
Comment 5 User image Moied 2002-04-17 12:26:24 PDT
Reassigning to Style System: CCS, CC'ing Madhur
Comment 6 User image Brant Gurganus 2002-06-08 12:27:24 PDT
Here is a testcase:
Comment 7 User image John A. 2002-06-21 21:42:01 PDT
Would this affect printing of tables as well? If not, there should be an
enhancement "bug" logged for that.
Comment 8 User image David Baron :dbaron: ⌚️UTC-8 2004-02-07 11:03:50 PST
Requests for new CSS properties that need to be implemented in layout should
generally live in the appropriate layout component, since that's where most of
the work is.
Comment 9 User image Kevin Benton 2005-05-25 13:47:55 PDT
I have been able to reproduce this issue as well...
Comment 10 User image Kevin Benton 2005-05-25 13:57:04 PDT for sample
output of the following code

    orphans: 4;
    page-break-inside: avoid;
    text-align: left;
    widows: 4;
<div class="issues">
    This section lists all the Development Plan review issues and their current

Comment 11 User image Mikko Rantalainen 2006-02-27 01:20:32 PST
I guess it doesn't make sense to support this before fixing bug 132035 (I guess this cannot be supported until page-break-inside: avoid is supported). Adding dependency.
Comment 12 User image Zack Weinberg (:zwol) 2010-02-18 11:39:21 PST
Orphan and widow control is also supposed to apply to individual columns in CSS3 multicolumn mode (see <>).  That might be implementable separately from the page-break controls.
Comment 13 User image Florian Bender 2014-02-01 12:29:24 PST
This makes more sense in CSS.
Comment 14 User image Chris Rebert 2016-08-25 09:01:03 PDT
This feature is already supported in all other major browsers except Firefox, according to
Comment 15 User image Gérard Talbot 2016-10-14 17:18:16 PDT
(In reply to Zack Weinberg (:zwol) from comment #12)
> Orphan and widow control is also supposed to apply to individual columns in
> CSS3 multicolumn mode (see
> <>). 

In any case, the user agent should try to honor the ‘widows’ and ‘orphans’ properties.
The CSS3 multicolumn spec uses a SHOULD in such context.

A page/column/region break opportunity between line boxes is under the influence of the containing block’s break-inside, widows, and orphans properties.
CSS Fragmentation 3, section 3. Controlling Breaks

Opera 12.16 and Chrome 54+ implement widows (and, presumably, also orphans) for column boxes while Firefox 52.0a1 does not. This explains the difference of rendering of 'column-fill: auto' of topmost orange rectangle (with only single alphabetical letters) of this test:

> That might be implementable separately from the page-break controls.

Maybe a distinct, separate bug report should be created and then make it block bug 549114.
Comment 16 User image Gérard Talbot 2016-10-14 17:36:32 PDT
Chrome 54.0.2840.59 and Chrome 55.0.2883.11 pass the 5 orphans and 5 widows tests we have

Note that widows-004a test is incorrect:

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