supporting page-break-* for static media such as images

RESOLVED DUPLICATE of bug 132035

Status

()

RESOLVED DUPLICATE of bug 132035
6 years ago
6 years ago

People

(Reporter: matthew.d.sigley, Unassigned)

Tracking

21 Branch
x86
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20100101 Firefox/21.0 (Beta/Release)
Build ID: 20130511120803

Steps to reproduce:

Tried to use the following CSS rule in my print style sheet.

img { 
	page-break-inside: avoid;
}


Actual results:

Page breaks still occur inside of images.


Expected results:

Page breaks should occur before or after images. This is how this CSS renders in Opera.
Component: Untriaged → Layout
Product: Firefox → Core
Status: UNCONFIRMED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 132035

Comment 2

6 years ago
(In reply to matthew.d.sigley from comment #0)

> Tried to use the following CSS rule in my print style sheet.
> 
> img { 
> 	page-break-inside: avoid;
> }

"
 'page-break-inside'
(...)
    Applies to:  	block-level elements (but see text) 
(...)
User Agents must apply these properties to block-level elements in the normal flow of the root element. User agents may also apply these properties to other elements, e.g., 'table-row' elements. 
"
CSS 2.1, section 13.3.1: Page break properties
http://www.w3.org/TR/CSS21/page.html#page-break-props

It is not required by user agents to avoid breaking pages within images.


> Actual results:
> 
> Page breaks still occur inside of images.

This test
 
http://www.gtalbot.org/BugzillaSection/Bug132035_Page_Break_Inside_Avoid.html

used to fail in Firefox but now Firefox 19 (and later) passes it. And so the 5 'page-break-inside: avoid' tests at
http://test.csswg.org/suites/css2.1/nightly-unstable/html4/chapter-13.htm#s13.3.1
(Look for the 5 page-break-inside-00? tests)

-------

Boris, I think this bug should have been resolved as INVALID, otherwise as a DUPLICATE of bug 685012.

Gérard
(Reporter)

Comment 3

6 years ago
Gérard,

I understand the Firefox implementation of this CSS property now. I submitted this bug for the following reasons:
1. This information is not clearly explained in the MDN article for page-break-avoid.
2. EVERY other browser besides Firefox has implemented page-break-avoid for images. So while it may not be in the technical standard it has become a de-facto standard that should be implemented.

Works in:
Chrome
IE 10
Opera

Matthew

Comment 4

6 years ago
> (...) for the following reasons:
> 1. This information is not clearly explained in the MDN article for
> page-break-avoid.

Well, then you can provide feedback at this page:

https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-inside

> 2. EVERY other browser besides Firefox has implemented page-break-avoid for
> images.

Then please create a *_reduced_* test and then paste the URL. This is very important.

How to Really, Really Help Developers on Bugs -- Minimal Testcases
https://wiki.mozilla.org/MozillaQualityAssurance:Triage#How_to_Really.2C_Really_Help_Developers_on_Bugs_--_Minimal_Testcases
You need to log in before you can comment on or make changes to this bug.