Extension:NewPageCSS
Jump to navigation
Jump to search
![]() | This extension is currently not actively maintained! Although it may still work, any bug reports or feature requests will more than likely be ignored. |
![]() | This extension stores its source code on a wiki page. Please be aware that this code may be unreviewed or maliciously altered. They may contain security holes, outdated interfaces that are no longer compatible etc. Note: No localisation updates are provided for this extension by translatewiki.net . |
NewPageCSS Release status: unmaintained |
|
---|---|
Implementation | Tag , Skin |
Description | Allows the inclusion of CSS style sheets within wiki pages |
Author(s) |
|
Latest version | 1.1.0 (2012-02-16) |
MediaWiki | 1.16+ |
PHP | 5.3+ |
Database changes | No |
License | GNU General Public License 2.0 or later |
Download | Source Code |
<css> |
|
The NewPageCSS extension uses the tag <css>
to include a CSS in the text of the wiki page; that CSS is then put into the header of the resulting HTML, and so formats your page. If you are creating a wiki page that ends up requiring a lot of style
modifiers, it's probably simpler to put them into a CSS style sheet.
Installation[edit]
- Download and place the file(s) in a directory called
NewPageCSS
in yourextensions/
folder. - Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/NewPageCSS/NewPageCSS.php";
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Usage[edit]
<css>
table.uc {
border-collapse: collapse;
}
.uc th {
background-color: #f2f2f2;
border: 1px solid black;
}
.uc td {
border: 1px solid black;
}
.uc td.pm {
background-color: #ffa0a0;
}
</css>
<table class="uc">
...
</table>
See also[edit]
I would like to acknowledge the author of the original extension PageCSS (Ævar Arnfjörð Bjarmason), which I have updated so it will work with current versions of MediaWiki.