Jump to content

Manual:Themes

From mediawiki.org

The "look and feel" of a website is determined by what we in the MediaWiki community call "a skin". Manual:Skins here on MediaWiki.org has more information about that.

Other popular PHP-based projects, like the famous blog software WordPress (which is also used as a Content Management System (CMS), eCommerce platform, etc.) or the forum software phpBB, have different names for the same idea. WordPress calls their skins "themes" whereas phpBB calls their skins "templates".

In MediaWiki templates are something entirely different, see Help:Templates. Support for both skins and templates is implemented in MediaWiki core, although core does not ship with any skins or templates.

Additionally developers have different kinds of "templates" available to them in the form of HTML templates and the TemplateParser class, since MediaWiki 1.25. This allows using the Mustache HTML templating language in MediaWiki extensions and skins. MediaWiki core also ships with an older HTML templating class, QuickTemplate.

Themes in MediaWiki are predefined CSS "bundles", originally implemented by Wikia (nowadays known as FANDOM) and popularized by an open-source extension originally authored by Skizzerz and currently maintained by Jack Phoenix: see Extension:Theme. Themes enhance an existing skin, but they are rather useless without skins. Support for themes is not currently in MediaWiki core and is instead provided by Extension:Theme which has to be separately downloaded and installed.

As of November 2022 the Theme extension ships with six themes, three for the MonoBook skin and three for the Vector (classic/"legacy"/not-Desktop Improvements version) skin. Some skins, such as Bouquet or Gamepress, have built-in themes, but to make use of them, the Theme extension needs to be installed on the wiki.

The OOUI (formerly OOjs UI) front-end library, which is on its way out already as of Q3/2024, also calls its own predefined CSS styles "themes" (see OOUI/Themes), but (as far as I'm aware of) these "themes" are not configurable by an individual skin developer and if one were to wish to add a custom OOUI theme, one would have to hack MediaWiki core (which is almost always a terrible idea) and it seems highly unlikely that there would be proper OOUI theme support in MediaWiki core because the WMF has decided to deprecate OOUI.

Questions, thoughts, feedback?

Leave a comment on the talk page!