Page MenuHomePhabricator

Margins (MediaWiki CSS file commonPrint.css)
Closed, ResolvedPublic

Description

Author: dovijacobs

Description:
The MediaWiki CSS file commonPrint.css (skins/common/commonPrint.css) contains the following CSS rule (lines #161-164):

p, .documentDescription {

margin: 1em 0 !important;
line-height: 1.2em;

}

The !important specifier should be removed. It sets paragraph margins to 1em, regardless of the actual styling and layout of the page (in regular mode). Many pages in the Hebrew wikisource make use of special styling/layout of the text, and this rule breaks the style in print mode, makes them effectively unprintable.
Major wikis (i.e., http://en.wikipedia.org/wiki/MediaWiki:Common.js) try to avoid this problem by providing some overloaded rules --

mw.util.addCSS( '@media print { sup, sub, p, .documentDescription { line-height: normal; }}');

However, due to the !important specifier, subsequent rules cannot alter the original one.
See also https://bugzilla.wikimedia.org/show_bug.cgi?id=17297#c2 .

(Note: I have filed this bug for: http://he.wikisource.org/wiki/%D7%9E%D7%A9%D7%AA%D7%9E%D7%A9:Fuzzy)


Version: unspecified
Severity: normal

Details

Reference
bz32795

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:00 AM
bzimport set Reference to bz32795.
bzimport added a subscriber: Unknown Object (MLST).

The margin issues is fixed in r105116