Extension:CSS

This extension allows CSS stylesheets to be included in specific articles. The CSS can be another article, a file or can be rules defined directly within the parser-function.

Usage
For example, if you have a CSS article called "MyStyles.css", which are the styles intended for use with the article "MyFancyUserPage", you would add the following parser-function syntax to the latter, If on the other hand "MyStyles.css" was a file in the /wiki/skins directory, then it would be included as shown below. Note that the file must be an absolute path with a leading slash to distinguish it from an article title. Alternatively, CSS rules can be directly included within the parser-function (inline) as in the following example,

Installation
Download the latest snapshot and extract it to your extensions directory. Then include it in your LocalSettings.php file as in the following example.

Optionally, you can set the base URL for external files.

Use as a PageCSS replacement
There is a prior Extension:PageCSS which used &lt;css> and &lt;/css> tags instead of the #css: parser function. It (and its sequel, Extension:NewPageCSS) appear to not be compatible with MediaWiki 1.19, however direct replacement of those extensions with this one leaves the obstacle that the syntax is different from the user perspective between those extensions and this CSS extension. That may break existing pages which still use the old &lt;css> tags.

One possible solution is to save this stub function as a PHP file and include it from your LocalSettings.php to remap &lt;css> to #css:

At this point, the prior PageCSS (or NewPageCSS) extensions may be removed from your configuration; &lt;css> now goes to #css: and (if you have this CSS extension already up and running) will behave the way any of the other CSS extensions always have.

Bugs
See talk page.