Open Bug 775617 Opened 13 years ago Updated 1 month ago

Implement page-break-before/page-break-after: avoid

Categories

(Core :: Layout, task)

task

Tracking

()

Size Estimate L

People

(Reporter: fantasai.bugs, Unassigned)

References

(Depends on 1 open bug, Blocks 2 open bugs, )

Details

(Keywords: dev-doc-needed, DevAdvocacy, parity-chrome, Whiteboard: [DevRel:P3][platform-feature][webcompat:risk-low])

Attachments

(3 files)

Breaking this subset out from bug 132035 as a separate bug. Scope is break-before: avoid | avoid-column | avoid-page; break-after: avoid | avoid-column | avoid-page; See http://www.w3.org/TR/css3-multicol/#column-breaks and http://www.w3.org/TR/css3-break/#break-properties
Blocks: css-break-3
Keywords: DevAdvocacy
Whiteboard: [DevRel:P2]
Whiteboard: [DevRel:P2] → [DevRel:P3]
Type: defect → task
Severity: normal → S3
Duplicate of this bug: 1779887

I think this has been overlooked for lack of someone explaining it very simply, and the MDN documentation on version compatibility being wrong for some time. It states that break-after: avoid; is supported since 72 which it was not (I didn't even see a specific mention in the patch notes for that version that says it was being supported).

I contributed separately on the Github Issue but it seems to have been looked over here too, so I'm happy to contribute some of the detail.

In the above posts I attached a test case document and screenshots that show the difference between the intended behaviour of break-after: avoid; in Chromium, versus how the behaviour occurs in Firefox.

You can see that the title 'The Sandy Dunes of the Sahara' in Chromium is pushed to the next page in the print preview, which is the behaviour you expect from break-after:avoid;, it doesn't let a page break come after the element. On Firefox by contrast you can see it has no effect at all. I chose an A4 page layout for this test document.

If you get a different result, make sure you are adding text to the paragraph above the H2 element sufficiently to force the heading to sit right before the page break in print preview. Remember that the correct behaviour is that the H2 element should never be the last element on the page, it should move down to join the paragraph below, or some text should remain under it on the previous page.

Can we set this bug to confirmed now?

Can we get at least a status update on whether it's a regression and it used to work on v72 or if this v72 is coming from nowhere?

I see this bug didn't make it into Interop again. Any chance it could be prioritised? This has been a bug since 1997 which makes it older than some of my colleagues!

The bug is harmful to understandability and the reading experience in paged media including ePubs, as well as column layout, etc.

Tyler's explanation above is excellent. Here's some more details and examples of the bug in action and why it's important to fix:

https://clagnut.com/blog/2426/

Keywords: parity-chrome
See Also: → 1972340
Whiteboard: [DevRel:P3] → [DevRel:P3][platform-feature][webcompat:risk-low]
Size Estimate: --- → L
Depends on: 683043
Duplicate of this bug: 2006336
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: