Last modified: 2011-03-13 18:06:50 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 12972 - Add page break rules to the "print" style-sheet
Add page break rules to the "print" style-sheet
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: css
  Show dependency treegraph
 
Reported: 2008-02-08 16:21 UTC by Ori Avtalion (salty-horse)
Modified: 2011-03-13 18:06 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Ori Avtalion (salty-horse) 2008-02-08 16:21:10 UTC
CSS2 defines special page break properties that can force or prevent page breaks from occuring:
http://www.w3.org/TR/CSS21/page.html#page-break-props

Whenever an article has a section heading, such as <h2>, a special rule can prevent it from being the last line in a printed page. By keeping headlines on the same page as the text they are heading, the text is easier to read.

Particularly, I'm suggesting the addition of this rule:
h2, h3 { page-break-after: avoid; }
Comment 1 Huji 2008-02-09 10:43:24 UTC
why not to use it for h1 and h4 then?
Comment 2 Ori Avtalion (salty-horse) 2008-02-09 12:05:34 UTC
Those as well :)

Though h1 is already at the top of the page. I can't think of a use-case where it matters.
Comment 3 Brion Vibber 2008-02-13 05:36:14 UTC
Do browsers actually implement this?
Comment 4 MZMcBride 2008-02-13 05:50:03 UTC
I use { page-break-before: always } on a personal wiki. It works perfectly for me on Firefox 2 and Safari 3.
Comment 5 Huji 2008-02-13 09:03:53 UTC
IE also supports this from its version 4. I think we're really going to implement this.

PS: Per http://reference.sitepoint.com/css/page-break-before IE's support is partial, but that doesn't matter here, because the value "always" is supported by all these browsers.
Comment 6 Huji 2008-02-13 09:11:19 UTC
Applied with r30902.
Comment 7 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-02-13 18:02:26 UTC
Reverted in r30910.  The applied style was probably not what was intended: it added a line break before every single heading, necessary or not.  The style we would want is page-break-after: avoid;, but I'm not convinced this would be useful.  Only Opera seems to implement it (maybe IE also?) -- but the thing is, the CSS standard suggests that this rule be present by default:

http://www.w3.org/TR/CSS21/sample.html

So unless someone can show that this actually changes the behavior of some browser, IMO, this should be WONTFIX.  Adding rules that aren't tested but make us feel all warm and fuzzy and standards-compliant has proven to be a bad idea in the past (e.g., my ingenious addition of a completely broken handheld stylesheet until one of the folks at Opera politely asked for us to remove it months later because it was screwing up display of Wikipedia).
Comment 8 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-02-13 18:02:59 UTC
(In reply to comment #7)
> a line break before every single heading

That's "page break", of course.
Comment 9 Huji 2008-02-13 18:43:28 UTC
Thanks, Simterical. I think I should have given it a little bit more research beforhand.
Comment 10 Ori Avtalion (salty-horse) 2008-02-13 22:45:12 UTC
(In reply to comment #7)
I agree to the WONTFIX. I didn't realize it was the default recommended CSS behavior.
Comment 11 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-02-13 23:55:11 UTC
Then it seems no one disagrees.  I'll mark this WONTFIX until someone comes up with a reason why this is useful; if you think you have, reopen.

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


Navigation
Links