Aller au contenu

« Mediawiki et CSS » : différence entre les versions

De Banane Atomic
 
(3 versions intermédiaires par le même utilisateur non affichées)
Ligne 2 : Ligne 2 :
= Links =
= Links =
* [https://www.mediawiki.org/wiki/Manual:CSS Manual CSS]
* [https://www.mediawiki.org/wiki/Manual:CSS Manual CSS]
* [https://www.mediawiki.org/wiki/Manual:Interface/Stylesheets Interface/Stylesheets]


= Add CSS for all the pages =
= Add CSS =
Add CSS to the page [[MediaWiki:Common.css]].
* for all the skins [[MediaWiki:Common.css]]
 
* for the Vector-2022 skin [[MediaWiki:Vector-2022.css]]
= Add CSS for mobile =
* for the mobile [[MediaWiki:Mobile.css]]
Add CSS to the page [[MediaWiki:Mobile.css]]
* for the current user [[Special:MyPage/common.css]]
 
* for the current user and the Vector skin [[Special:MyPage/vector.css]]
= Change the skin CSS =
<filebox fn=/usr/share/webapps/mediawiki/skins/MonSkin/SkinMonSkin.php lang=php>
function setupSkinUserCss( OutputPage $out ) {
    ...
 
    // ajout des fichiers css
    $out->addStyle( $this->stylename . '/custom.css', 'screen' );
    $out->addStyle( $this->stylename . '/geshi.css', 'screen' );
}
</filebox>
 
= Add CSS for a specific user =
* for all the pages → [[Special:MyPage/common.css]]
* for a specific style → [[Special:MyPage/monobook.css]]

Dernière version du 26 janvier 2025 à 15:28

Links

Add CSS