Help:Community CSS and JS

Through community CSS and JavaScript, local administrators can affect the way all visitors—logged in or not—see their wikis on desktop and tablets.

Local customization offers great challenge and satisfaction to many editors, so we at Fandom encourage you to try your hand at it. But there are two important things to keep in mind as you do:
 * Use the theme designer first, before attempting any CSS customization. It'll make your life a lot easier.
 * There are some limits as to what and how you can customize things, as both our customization policy and Terms of Use explain in greater detail.

CSS
To customize your community's CSS, simply edit MediaWiki:Wikia.css. You can also access this page from the Admin Dashboard via the CSS link.

Each week we release notes on upcoming changes that might affect your community's customizations: Technical Update blog posts

The Community Central Designing Your Wikia forum board is a great place to get help from other users, if needed. See also to learn more about custom community CSS.

CSS pages
MediaWiki:Common.css and MediaWiki:Wikia.css are both used for Fandom's layout, but they may be consolidated in the future.


 * On all wikis created after July 2014
 * MediaWiki:Common.css is loaded. The contents will be applied before MediaWiki:Wikia.css. For most communities this doesn't matter, but if you use  rules (like for importing custom fonts), it is best they are added to the top of MediaWiki:Common.css.


 * On most wikis created before July 2014
 * MediaWiki:Common.css is not loaded. If you want to use MediaWiki:Common.css, ask Fandom Staff to enable this. If you do so, make sure to clean up any old CSS in MediaWiki:Common.css beforehand, otherwise it may cause unexpected effects.

JavaScript
Before you can edit your community's JS, you must ask Fandom to turn it on for you. After it's enabled, you'll probably want to edit the main JS page, MediaWiki:Common.js. Whatever is there will be loaded for all visitors to your community, whether they're logged in or not. So be aware of the following:


 * For security reasons, edits to community JS must go through an approval process.
 * JS errors can break basic functionality on your community. Please be careful to avoid introducing errors.
 * Please do not include JS that you do not understand, nor import from sources that you do not fully trust. Additionally, do not import JS from personal JS pages, or from insecure pages.
 * A number of common scripts are stored at the Fandom Developers Wiki and can be added to your wiki using ImportJS. Using ImportJS bypasses the need for the review process.
 * As with the CSS pages, both Common.js and Wikia.js affect the whole wiki, but they may be consolidated in the future.

Some technicalities
Changes you make to either CSS or JS are usually not immediately seen upon publication. This is because of a concept called "caching". If you're in the middle of a lengthy period of editing your CSS and JS, you may have to frequently bypass your cache to see your changes.

Also, Fandom's load order—the priority given to each of the various pages used to customize your wiki—is crucial for administrators to understand. A common reason that some customizations aren't seen is because a later-loading page effectively cancels a declaration made on an earlier-loading page.

Further help and feedback
de:Hilfe:CSS und JS einer Community es:Ayuda:CSS y JS comunitario fi:Ohje:Yhteisön CSS ja JavaScript fr:Aide:CSS et JS de la communauté it:Aiuto:CSS e JS della community ja:ヘルプ:コミュニティのCSSとJavaScript pl:Pomoc:CSS i JS społeczności ru:Справка:CSS и JS локальные pt:Ajuda:CSS e JS da comunidade tr:w:c:tr.help:Yardım:Topluluk CSS ve JS uk:Довідка:CSS і JS локальні vi:Trợ giúp:CSS và JS cộng đồng zh:Help:社區CSS與JS