Last modified: 2008-09-04 03:18:00 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 2889 - Print stylesheet should be explicitly editable (e.g. MediaWiki:Print.css)
Print stylesheet should be explicitly editable (e.g. MediaWiki:Print.css)
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Brion Vibber
:
: 13831 (view as bug list)
Depends on:
Blocks: css
  Show dependency treegraph
 
Reported: 2005-07-18 04:14 UTC by Chris Sherlock
Modified: 2008-09-04 03:18 UTC (History)
3 users (show)

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


Attachments
r3638 - New (2.79 KB, patch)
2008-06-19 21:22 UTC, Platonides
Details

Description Chris Sherlock 2005-07-18 04:14:14 UTC
Could I request that, ala Monobook.css and Common.css, we are given access to
commonPrint.css? Currently we have a problem where some links are automatically
doing URL expansion, which is mucking up [[Template:Ref]] and [[Template:Note]].
This is causing problems for at least one editor, who is trying to create PDFs
out of webpages.
Comment 1 Brion Vibber 2005-07-18 16:30:06 UTC
What you can do is put an @media print section into [[MediaWiki:Monobook.css]]. 
You may be able to override things with !important declarations.
Comment 2 Chris Sherlock 2005-07-18 23:51:12 UTC
OK, though I'm no real expert at CSS :( I have noted this on [[User:Lupo]]'s page... thanks for 
the suggestion!
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-01-02 18:58:55 UTC
Note that @media-specified rules currently won't be used for the "printable
version" link, which is kind of confusing, but it's hard to see a fix unless you
can somehow force the browser to interpret the page as printed.
Comment 4 Danny B. 2008-05-06 10:22:02 UTC
Bug 13970 related.
Comment 5 Brion Vibber 2008-05-06 23:24:05 UTC
*** Bug 13831 has been marked as a duplicate of this bug. ***
Comment 6 Chad H. 2008-06-15 20:31:33 UTC
Done in r36308
Comment 7 Brion Vibber 2008-06-19 18:19:36 UTC
Doesn't actually work -- applies in ?printable=yes print mode simulation, but not to the actual print stylesheet.

Reverted in r36474
Comment 8 Platonides 2008-06-19 21:22:45 UTC
Created attachment 5003 [details]
r3638 - New

Same as r3638 but accounting for printing.
I favoured an if-based approach for clarity, but you may prefer a ternary operator. It's up to the committer :-)
Comment 9 Chad H. 2008-06-21 23:41:39 UTC
Merged Platonides and my patches in r36535. Now applies to printable=yes and to actual print media.
Comment 10 Splarka 2008-06-22 00:15:02 UTC
It seems like the best way to do this would be to add another <link> attribute (below the current existing one) pointing to the appropriate MW message. And in printable=yes, remove the media="print".

In template skins:
 <link rel="stylesheet" type="text/css" media="print" href="/skins-1.5/common/commonPrint.css?156" />
 <link rel="stylesheet" type="text/css" media="print" href="/w/index.php?title=MediaWiki:Print.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=2678400" />

And in cologneblue/standard/nostalgia:
 <link rel='stylesheet' type='text/css' media='print' href='/skins-1.5/common/wikiprintable.css?156' />
 <link rel="stylesheet" type="text/css" media="print" href="/w/index.php?title=MediaWiki:Print.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=2678400" />

(In reply to comment #1)
> What you can do is put an @media print section into [[MediaWiki:Monobook.css]]. 

Unlike @media print, the media="print" from the link is (and so can be) removed on printable=yes, allowing all changes in commonPrint.css (and hypothetically in this implementation of MediaWiki:Print.css), to apply without printing (or print preview). 2 cents
Comment 11 AlexSm 2008-07-07 13:48:16 UTC
Reopening, since the patch was self-reverted by ^demon in r36536.
Comment 12 Brion Vibber 2008-09-04 03:18:00 UTC
Re-did in r40414, using the happy new style setup methods. MediaWiki:Print.css
available by default; MediaWiki:Handheld.css used if $wgHandheldStyle set up.

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


Navigation
Links