Aller au contenu

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

De Banane Atomic
 
(5 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]].<br>
* for all the skins [[MediaWiki:Common.css]]
Same but for a specific user [[Special:MyPage/common.css]].
* for the Vector-2022 skin [[MediaWiki:Vector-2022.css]]
 
* for the mobile [[MediaWiki:Mobile.css]]
= Add CSS for mobile =
* for the current user [[Special:MyPage/common.css]]
Add CSS to the page [[MediaWiki:Mobile.css]]
* for the current user and the Vector skin [[Special:MyPage/vector.css]]
 
= Modifier le style d'un skin =
<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>

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

Links

Add CSS