Difference between revisions of "Custom Styling"
From Tweeki
| Line 4: | Line 4: | ||
* via '''[[Mediawiki:Common.css]]''': be aware that it is not used for the login and preferences pages (you can, hower, [http://www.mediawiki.org/wiki/Manual:CSS#Styles_not_working_on_Special:UserLogin_or_Special:Preferences.3F allow it] if you don't care for the security implications) | * via '''[[Mediawiki:Common.css]]''': be aware that it is not used for the login and preferences pages (you can, hower, [http://www.mediawiki.org/wiki/Manual:CSS#Styles_not_working_on_Special:UserLogin_or_Special:Preferences.3F allow it] if you don't care for the security implications) | ||
* via your own extension | * via your own extension | ||
| + | |||
| + | |||
| + | <pre> | ||
| + | $wgResourceModules['xxx'] = [ | ||
| + | 'styles' => 'styles.css', | ||
| + | 'localBasePath' => 'extensions/Test', | ||
| + | 'remoteExtPath' => 'Test', | ||
| + | 'position' => 'top' | ||
| + | ]; | ||
| + | </pre> | ||
Revision as of 15:47, 18 February 2019
As usual you have several options to add custom CSS to your MediaWiki installation (see also the manual pages on mediawiki.org):
- via Mediawiki:Common.css: be aware that it is not used for the login and preferences pages (you can, hower, allow it if you don't care for the security implications)
- via your own extension
$wgResourceModules['xxx'] = [
'styles' => 'styles.css',
'localBasePath' => 'extensions/Test',
'remoteExtPath' => 'Test',
'position' => 'top'
];