Merge "(bug 17602) fix Monobook action tabs not quite touching the page body"
[lhc/web/wiklou.git] / docs / skin.txt
1 skin.txt
2
3 MediaWiki includes four core skins:
4
5 * Vector: The default skin. Introduced in the 1.16 release (2010), it has been
6 set as the default in MediaWiki since the 1.17 release (2011), replacing
7 Monobook.
8
9 * Monobook: Named after the black-and-white photo of a book in the page
10 background. Introduced in the 2004 release of 1.3, it had been been the
11 default skin since then, before being replaced by Vector.
12
13 * Modern: An attractive blue/grey theme with sidebar and top bar. Derived from
14 Monobook.
15
16 * Cologne Blue: A lightweight skin with minimal formatting. The oldest of
17 currently bundled skins, largely rewritten in 2012 while keeping the looks.
18
19
20 Several legacy skins were removed in the 1.22 release, as the burden of
21 supporting them became too heavy to bear. Those were:
22
23 * Standard (a.k.a. Classic): The old default skin written by Lee Crocker during
24 the phase 3 rewrite, in 2002.
25
26 * Nostalgia: A skin which looks like Wikipedia did in its first year (2001).
27 This skin is now used for the old Wikipedia snapshot at
28 http://nostalgia.wikipedia.org/
29
30 * Chick: A lightweight Monobook skin with no sidebar, the sidebar links were
31 given at the bottom of the page instead.
32
33 * Simple: A lightweight skin with a simple white-background sidebar and no top
34 bar.
35
36 * MySkin: Monobook without the CSS. The idea was that you customise it using
37 user or site CSS.
38
39
40 == Custom CSS/JS ==
41
42 It is possible to customise the site CSS and JavaScript without editing any
43 source files. This is done by editing some pages on the wiki:
44
45 * [[MediaWiki:Common.css]] -- for skin-independent CSS
46 * [[MediaWiki:Common.js]] -- for skin-independent JavaScript
47 * [[MediaWiki:Vector.css]], [[MediaWiki:Monobook.css]], etc. -- for
48 skin-dependent CSS
49 * [[MediaWiki:Vector.js]], [[MediaWiki:Monobook.js]], etc. -- for
50 skin-dependent JavaScript
51
52 These can also be customised on a per-user basis, by editing
53 [[User:<name>/vector.css]], [[User:<name>/vector.js]], etc.
54
55 This feature has led to a wide variety of "user styles" becoming available:
56
57 http://www.mediawiki.org/wiki/Manual:Gallery_of_user_styles
58
59 If you want a different look for your wiki, that gallery is a good place to start.
60
61 == Drop-in custom skins ==
62
63 If you put a file in MediaWiki's skins directory, ending in .php, the name of
64 the file will automatically be added as a skin name, and the file will be
65 expected to contain a class called Skin<name> with the skin class. You can then
66 make that skin the default by adding to LocalSettings.php:
67
68 $wgDefaultSkin = '<name>';
69
70 You can also disable dropped-in or core skins using:
71
72 $wgSkipSkins[] = '<name>';
73
74 This technique is used by the more ambitious MediaWiki site operators, to
75 create complex custom skins for their wikis. It should be preferred over
76 editing the core Monobook skin directly.
77
78 See http://www.mediawiki.org/wiki/Manual:Skinning for more information.
79
80 == Extension skins ==
81
82 It is now possible (since MediaWiki 1.12) to write a skin as a standard
83 MediaWiki extension, enabled via LocalSettings.php. This is done by adding
84 it to $wgValidSkinNames, for example:
85
86 $wgValidSkinNames['mycoolskin'] = 'MyCoolSkin';
87
88 and then registering a class in $wgAutoloadClasses called SkinMycoolSkin, which
89 derives from Skin. This technique is apparently not yet used (as of 2008)
90 outside the DumpHTML extension.
91