Book Image

MediaWiki Skins Design

Book Image

MediaWiki Skins Design

Overview of this book

Table of Contents (16 chapters)
MediaWiki Skins Design
Credits
About the Author
About the Reviewer
Preface

What's Already Done for Us: commonPrint.css


The default print stylesheet for MediaWiki is linked to within the <head> element of your wiki's template file. It is called commonPrint.css, and is stored in the skins/common/ directory of your MediaWiki installation.

You can add additional styling to this file to accommodate your new skin, although changing the CSS in this file will cause the print styling for other MediaWiki skins to change too.

Note

Backup commonPrint.css before you alter it.

Creating a backup copy of the commonPrint.css file is a good idea as it could be useful for future reference. If you decide to remove your skin, you can simply replace the previous version of the file to keep the CSS file's size small.

The body of the document is styled to have a white background and black text to make printed copies of the content easier to read:

body {
background: White;
color: Black;
margin: 0;
padding: 0;
}

A Separate Print Stylesheet

If you are planning to alter other skins'...