Revision as of 00:33, 3 March 2011 editEdokter (talk | contribs)Extended confirmed users55,830 editsm →Classes: wording← Previous edit | Revision as of 18:08, 10 March 2011 edit undoAlex Smotrov (talk | contribs)1,908 edits →Stylesheets and JavaScript: since this is really outdated, a temporary note that might be helpful for someNext edit → | ||
Line 29: | Line 29: | ||
== Stylesheets and JavaScript == | == Stylesheets and JavaScript == | ||
The following table is '''really outdated''' since MediaWiki 1.17. One way to look at the core CSS and JS files is to install ], load any Misplaced Pages page with ] URL parameter (this will separate different CSS files, prevent minification and preserve comments), then in Firebug switch to "CSS" tab, select CSS file and click "Edit". Another way is to look at these files ; note that some JS files already migrated to . | |||
{| class="wikitable plainlinks" border="1" | {| class="wikitable plainlinks" border="1" |
Revision as of 18:08, 10 March 2011
For the assessment grading scale, see Misplaced Pages:Version 1.0 Editorial Team/Assessment. For the classroom coordination, see Misplaced Pages:WikiProject Classroom coordination. ShortcutThis Misplaced Pages page needs to be updated. Please help update this Misplaced Pages page to reflect recent events or newly available information. Relevant discussion may be found on the talk page. |
There are a lot of classes and IDs used on the English Misplaced Pages. The use of most of them is not clearly explained or described anywhere but on the place they are used. However, since Special:Whatlinkshere does not work for CSS, it can be hard to find these explanations; the definitions themselves can be located in many different places.
This page is an attempt to catalogue and describe all the classes and IDs used on this wiki.
There are still a lot of classes and IDs to document, add some! Also add information about other skins.
CSS caching is important
ShortcutThe CSS style sheets and the JavaScript files that are loaded for Misplaced Pages users are set to be cached for 31 days in readers' browsers. So when a change is made to a global skin file, users who have only just recached their copies of the files will not necessarily receive the update for a month after it is made. So when making changes to site CSS, be careful that any changes you then make to templates and articles etc., that they will also look reasonable when displayed with the old styles. Usually, this involves not 'deploying' the new styles for 31 days after they are added.
Alternatively, it is possible to use hard coded styles while waiting for the new code to 'decache'. If this is done it is a good idea to also add the class name in the template or page code, so that the hardcoded styles can be overridden immediately by users' personal CSS by using the "!important
" keyword. And that means that in many cases we don't even need to add the class in for instance MediaWiki:Common.css.
Say you have a template named {{bigbox}}, then you can code it like this:
<table class="bigbox" style="background: yellow;"> <tr><td>Some content.</td></tr> </table>
Then a user can put this code into his personal /vector.css to override that ugly background:
.bigbox { background: transparent !important; }
Stylesheets and JavaScript
The following table is really outdated since MediaWiki 1.17. One way to look at the core CSS and JS files is to install Firebug, load any Misplaced Pages page with ?debug=true
URL parameter (this will separate different CSS files, prevent minification and preserve comments), then in Firebug switch to "CSS" tab, select CSS file and click "Edit". Another way is to look at these files at SVN; note that some JS files already migrated to /resources.
- Notes
- ^ Only available to logged in users. Gadgets are not loaded on Special:Preferences. User css/js is not loaded on Special:Preferences, Special:ChangePassword or Special:UserLogin. Cite error: The named reference "ul" was defined multiple times with different content (see the help page).
- ^ Can be disabled via preferences.
Page/action specific
Several types of MediaWiki pages and actions, and preferences load conditional stylesheets and javascript, to reduce the burden of unnecessary script loading.
script or style | page or action | description |
---|---|---|
allmessages.js | Special:Allmessages | Filtering tools for Allmessages list. |
block.js | Special:Blockip | Dynamic updating of block form elements. |
categorytree.js |
Special:CategoryTree and pages with <categorytree> |
mw:Extension:CategoryTree |
diff.css | diff pages | Stylesheet specifically for diff tables. |
diff.js | diff pages | Javascript specifically for diff tables (Mozilla <1.2 fix). |
edit.js | action=edit | Edit page tools, split from wikibits.js. |
feed.css | RSS/Atom feeds | "Make RSS and Atom feeds at least semi-legible to folk who accidentally load them in a browser..." |
history.js | action=history | History radio button list display. |
metadata.js | image pages with EXIF metadata | Show/hide tool for extended metadata list. |
mwsuggest.js | if not disabled in preferences | Activates new search suggest ajax (enabled by default on Wikimedia). |
prefs.js | Special:Preferences | Dynamic tabs and other tools in user preferences. |
action=edit | Live preview module, disabled on Misplaced Pages. | |
protect.js | action=protect | Dynamic updating of protect form elements. |
rightclickedit.js | if enabled in preferences | Activates section editing by right-clicking on section titles. |
upload.js | Special:Upload | Dynamic updating of upload form elements, and template selection preview. |
MediaWiki:Geshi.css | Any page using <source> | Part of the SyntaxHighlight extension. |
Scripts loaded from MediaWiki:Common.js: | ||
MediaWiki:Common.js/edit.js | Edit pages and Special:Upload | |
MediaWiki:Common.js/file.js | File (image) pages. | |
MediaWiki:Common.js/watchlist.js | Special:Watchlist | |
Template:Sec link auto | WikiMiniAtlas popup button for the coordinate links. (Loads on all pages.) |
User group specific
Special stylesheets and javascript are loaded for some user groups. The loading is done by code in MediaWiki:Common.js.
script or style | description |
---|---|
MediaWiki:Accountcreator.css | For accountcreators. |
MediaWiki:Sysop.css | For admins. |
MediaWiki:Sysop.js | For admins. |
LocalSettings specific
Certain site settings result in loading of specific styles and scripts. Most of these do not apply to the English wikipedia.
script or style | skins | description |
---|---|---|
ajaxsearch.js | Older version of mwsuggest.js (requires $wgAjaxSearch to be enabled, disabled here). | |
chick/rtl.css (missing) | chick | RTL styles (if content language is a right-to-left aligned writing system) for chick. |
modern/rtl.css | modern | RTL styles (if content language is a right-to-left aligned writing system) for modern. |
monobook/rtl.css | monobook | RTL styles (if content language is a right-to-left aligned writing system) for monobook. |
myskin/rtl.css (missing) | myskin | RTL styles (if content language is a right-to-left aligned writing system) for myskin. |
simple/rtl.css | simple | RTL styles (if content language is a right-to-left aligned writing system) for simple. |
common_rtl.css | standard, cologne blue, nostalgia | RTL styles for non-template skins. Not applicable here. |
quickbar.css | standard | Quickbar style. |
quickbar-right.css | standard | Right-aligned quickbar style. |
sticky.js | standard | Enable floating quickbar. |
Browser specific
- Internet Explorer, KHTML and older versions of Opera are a bit more buggy than other popular browsers, and needs some additional CSS and JavaScript to work around some of its bugs.
skin | IE 5.0 – 6.0 | IE 5.0 | IE 5.5 | IE 6.0 | IE 7.0 |
---|---|---|---|---|---|
Chick
|
common/IEFixes.js | chick/IE50Fixes.css | chick/IE55Fixes.css | chick/IE60Fixes.css | |
MonoBook
|
common/IEFixes.js | monobook/IE50Fixes.css | monobook/IE55Fixes.css | monobook/IE60Fixes.css | monobook/IE70Fixes.css |
MySkin
|
common/IEFixes.js | ||||
Simple
|
common/IEFixes.js | ||||
Vector
|
common/IEFixes.js |
skin | IE Mac | KHTML | Opera 6 | Opera 7 |
---|---|---|---|---|
Chick
|
||||
MonoBook
|
monobook/IEMacFixes.css | monobook/KHTMLFixes.css | monobook/Opera6Fixes.css | monobook/Opera7Fixes.css |
MySkin
|
||||
Simple
|
||||
Vector
|
- Note that these are loaded sometimes via IE <!----> comment syntax, and sometimes via CSS, and sometimes via Javascript.
Classes
We often add the name of a template or MediaWiki message itself as a class name in the code of the template or message. This allows users to style the message, and it allows future skinning of the message in the global CSS files. Please do not document such class names here, unless they are actually used in some CSS or JavaScript file, since there are (or at least should be) literally thousands of such class names.
class | description | in CSS¹ | in HTML¹ |
---|---|---|---|
accountcreator-show | Makes the red "Group notice" and "Page notice" editnotice links visible to accountcreators. Only use this for very short items, since some browsers show hidden items to all users. | MediaWiki:Accountcreator.css | {{editnotice load}} |
:active | A CSS pseudo-class. See the W3 standard. | monobook/main.css (screen, projection) | N/A |
active | Used on the active tab button (monobook). | monobook/main.css (screen, projection) | skins/MonoBook.php |
allpagesredirect | Redirect in the listings of Special:Allpages and Special:Prefixindex. | MediaWiki:Common.css | includes/specials/SpecialAllpages.php |
ambox, ambox-* | Article message box template styles. See also mbox-text etc. below. |
MediaWiki:Common.css, MediaWiki:Print.css (hidden when printed from articles) | {{ambox}} meta-template that is used to create most article message boxes.
|
autocomment | Used for the section bits in edit summaries, i.e. the part between /* and */ on watchlist and rc pages. | common/shared.css | includes/Linker.php |
autonumber | Class used in the interface for external links | — | includes/parser/Parser.php |
autosigned | Class used to format automatic signatures | — | {{Unsigned}}
|
boilerplate | Another template class | — | {{tfd}}
|
dmbox, dmbox-* | Disambig and set index message box styles. See also mbox-text etc. below. |
MediaWiki:Common.css | {{dmbox}} meta-template that is used to create most disambig and set index message boxes.
|
catlinks | Category links normally at the bottom of the page. | chick/main.css (screen, projection) | includes/Skin.php |
center | Emulates <center> functionality
|
monobook/main.css | includes/Linker.php |
cmbox, cmbox-* | Category message box template styles. See also mbox-text etc. below. |
MediaWiki:Common.css | {{cmbox}} meta-template that is used to create most category message boxes.
|
collapsible, collapsed, autocollapse, innercollapse/outercollapse | Allows tables to be expanded and collapsed using associated javascript. See Help:Collapsing | MediaWiki:Common.js | {{navbox}}
|
collapseButton | Applied to the spans containing the show/hide links created by the CollapsibleTables javascript. | MediaWiki:Common.css, MediaWiki:Common.js | {{navbox}}
|
comment | Edit summaries on watchlist and rc pages. | monobook/main.css (screen, projection) | includes/Linker.php |
cleanup | (Deprecated) Used on some cleanup templates | MediaWiki:Common.css | |
dablink | Used to mark disambiguation links at the top of pages. | MediaWiki:Print.css (hidden when printed from articles) | {{dablink}}
|
dangerousLink | Used on Image pages to not have dangerous file types display previews. | ? | includes/ImagePage.php |
def | Used in the allmessagestable, Special:Allmessages (System messages) | chick/main.css (screen, projection), monobook/main.css (screen, projection) | includes/specials/SpecialAllmessages.php |
diff, diff-addedline, diff-context, diff-deletedline, diff-ntitle, diff-otitle, diffchange | Used by the diff view | common/commonPrint.css, common/diff.css, MediaWiki:Monobook.css, simple/main.css | skin on diff view, includes/normal/RandomTest.php |
disputed | (Deprecated) A cleanup class. | ? | |
editlink | Class to mark an Edit link for use in templates. | MediaWiki:Print.css (hidden when printed) | {{ed right}} , {{ed2}} , {{ed}}
|
error | Marks up errors | MediaWiki:Monobook.css (only defined for paragraph elements), monobook/main.css (line 278), chick/main.css (screen, projection) | includes/Math.php, {{db-t3}} , …
|
editHelp | Interface section | ? | includes/EditPage.php |
editOptions | Used in the div surrounding the minor edit and watch this page checkboxes. | monobook/main.css, | includes/EditPage.php |
editsection | Class used in the interface for section links | common/commonPrint.css (hidden when printed) | includes/Linker.php |
edittools-text | Prevents the static edittools from flashing before the compact edittools is loaded. | MediaWiki:Common.js/edit.js | MediaWiki:Edittools |
external | Class used in the interface for external links | monobook/main.css (screen, projection) | includes/Linker.php |
extiw | Used for Interwiki links. | monobook/main.css (screen, projection) | includes/Linker.php |
expansion | (Deprecated) A type of cleanup class | ? | |
div.fmbox-warning, mw-warning-with-logexcerpt, mw-cascadeprotectedwarning | Pink {{fmbox}} warning style for div based system warning notices. The interface renders a div with one of the "mw-…" classes around messages like MediaWiki:Protectedpagewarning. | MediaWiki:Common.css | MediaWiki:Editingold, includes/EditPage.php |
firstHeading | Used on the title of the page, e.g. "Misplaced Pages:Catalogue of CSS classes" | monobook/main.css (screen, projection) | skins/MonoBook.php |
floatright, floatleft, floatnone | Used to float something to the right/left of the page (or not float it at all) | monobook/main.css (screen, protection) common/commonPrint.css (print) |
includes/Linker.php |
free | Used in the interface for external links | — | includes/parser/Parser.php |
horizontal | Used to create horizontal lists | MediaWiki:Common.css | {{flatlist}}
|
image | Interface class used for links to images. | ? | includes/Linker.php |
imbox, imbox-* | Image pages message box template styles. See also mbox-text etc. below. |
MediaWiki:Common.css | {{imbox}} meta-template that is used to create most image message boxes.
|
interwiki-xx | Interface class used for interlanguage links in the page margin for language with code xx. | — | includes/SkinTemplate.php |
infobox | Formatting for article infoboxes | MediaWiki:Common.css | Infoboxes |
internal | Used in the interface on "Edit summary" and the question mark by the minor edit checkbox links, and in the links in the copyright statement(to the GFDL and Misplaced Pages:Copyrights). | ? | includes/Parser.php, languages/Language.php, skins/Standard.php, includes/Linker.php |
IPA | Font-selection fixes for Windows, for IPA | MediaWiki:Common.css, MediaWiki:Common.css/WinFixes.css | {{IPA}} , {{IPA2}}
|
ltr and rtl | Set in HTML body element. ltr = Page text goes "Left To Right" like now. rtl = Text goes "Right To Left", like in the Arabic Misplaced Pages. | body | |
magnify | The two "magnify" rectangles in the caption of a thumb'ed image (magnify-clip.png) | common/shared.css, monobook/main.css, common/commonPrint.css (print) | Linker.php (line 675) |
mbox-inside | Tag for templates that might contain mboxes like {{imbox}} and {{tmbox}} . So that mboxes can detect that they are inside and adapt their margins accordingly.
|
MediaWiki:Common.css | {{information}} , {{WikiProjectBanners}} and {{WikiProjectBannerShell}} should have this class.
|
mbox-text, mbox-image, mbox-imageright, mbox-empty-cell | Used in <td> and <th> elements inside message boxes. See Misplaced Pages:Ambox CSS classes. | MediaWiki:Common.css | {{ambox}} , {{tmbox}} , {{imbox}} , {{cmbox}} , {{ombox}} , {{fmbox}} and {{dmbox}} meta-templates that are used to build most message boxes.
|
mediawiki | Set in HTML body element, to identify pages generated by MediaWiki. | as of 31533 this should appear in all skins | |
merge | (Deprecated) A cleanup class. | MediaWiki:Common.css | |
messagebox | (Deprecated) Used on some Template messageboxes, sensibly enough. | MediaWiki:Common.css | |
metadata | Used to mark items that should not be printed when on articles. Does print when in other namespaces. See also noprint below. | MediaWiki:Print.css (hidden when printed from articles) | {{dmbox}} , {{Catfd}} , {{tfd}} , {{ambox}}
|
minor | Used for the "m" marking minor edits. | monobook/main.css | includes/specials/SpecialContributions.php |
mufi | Forces fonts used for Medieval Unicode Font Initiative (discussion) | MediaWiki:Common.css | {{mufi}}
|
mw-headline | The headline in a heading (without the "" link) | ? | includes/Linker.php |
mw-hidden-cats-hidden | "Hidden categories" with preference "Show hidden categories" off | common/shared.css | includes/Skin.php |
mw-hidden-cats-ns-shown | "Hidden categories" in the Category namespace | includes/Skin.php | |
mw-hidden-cats-user-shown | "Hidden categories" with preference "Show hidden categories" on | includes/Skin.php | |
mw-tag-markers | Tags of the Edit filter | MediaWiki:Common.css | |
namespacesettings | Interface section on Recent Changes page | ? | includes/specials/SpecialRecentchanges.php |
namespaceselector | Part of the Recent Chages page | ? | includes/GlobalFunctions.php |
navbox, navbox-* | Formatting for navigational boxes | MediaWiki:Common.css | {{navbox}}
|
NavFrame, NavHead, NavPic, NavContent | Used by the experimental Dynamic Navigation Bars code (See Misplaced Pages:NavFrame) | MediaWiki:Monobook.js | {{hidden}} , {{hidden begin}} , ({{hidden end}} )
|
new | The redlink class; used on internal links to pages that do not have any undeleted history. | monobook/main.css (screen, projection), common/commonPrint.css (print) | includes/Linker.php, includes/Skin.php, languages/Language.php |
Used in the allmessagestable, Special:Allmessages (System messages) | chick/main.css (screen, projection), monobook/main.css (screen, projection) | includes/specials/SpecialAllmessages.php | |
newpage | The "N" used for new pages on watchlist, etc. | monobook/main.css (screen, projection) | includes/ChangesList.php |
noarticletext | See MediaWiki:Noarticletext. | monobook/main.css (screen, projection) | includes/Article.php |
nonumtoc | Hides automatic numbering on the table of contents (in combination with explicitly stating __TOC__ or __FORCETOC__ | MediaWiki:Common.css | Articles |
noprint | Hides content when printed. But for most usage, see metadata above instead. | common/commonPrint.css, MediaWiki:Print.css (hidden when printed) | {{ed right}} , {{ed2}} , {{ed}} , {{edit}} , {{Shortcut}} , and others.
|
notice | (Deprecated) Style for "notices"? Used to be used in {{disambig}} etc. | MediaWiki:Common.css | |
nounderlines | Disables underlines on links who are children of this element (original request) | MediaWiki:Common.css | Articles |
nourlexpansion | When printing only print the title of the link and not the link itself. (replaces "plainlinksneverexpand") | MediaWiki:Print.css | |
nowraplinks | Prevents line wraps inside links, but allows word wraps between the links and in normal text. Useful for instance for long link lists. | MediaWiki:Common.css | {{nowraplinks}} , {{nowraplinks end}} , {{navbox}}
|
ns--1, ns-0 - ns-101 | Set in HTML body element. Shows which namespace the page is in. ns-0 (main), ns-1 (Talk) and so on. "ns--1" is used on all "Special:" pages. See Misplaced Pages:Namespace#Enumeration. | includes/Skin.php | |
ns-talk, ns-subject, ns-special | Set in HTML body element. Shows which namespace the page is in. "ns-talk" = all talk pages. "ns-subject" = all non-talk pages, such as articles, "Misplaced Pages:", "Image:" and so on. "ns-special" = all "Special:" pages (see Special:SpecialPages). See also Misplaced Pages:Namespace. | ||
ombox, ombox-* | Other pages message box template styles. See also mbox-text etc. above. |
MediaWiki:Common.css | {{ombox}} meta-template that is used to create most other pages message boxes.
|
orig | Used in the allmessagestable, Special:Allmessages (System messages) | chick/main.css (screen, projection), monobook/main.css (screen, projection) | includes/specials/SpecialAllmessages.php |
page-Pagename | Each page has its own name as a class in the body tag. Formed by the pagename with spaces and colons replaced by underscores, and prefixed by "page-". Like this page's body has the class "page-Wikipedia_Catalogue_of_CSS_classes" in its body tag. | includes/Skin.php | |
pBody | Used all-around on the various body-like pieces of the interface, including personal tools, sidebar, and tabs. | monobook/main.css | skins/MonoBook.php |
persondata | biographical metadata | — | {{Persondata}}
|
plainlinks | Disables the external link arrow | common/shared.css | {{Catfd}} , {{tfd}} , and many other places.
|
plainlinks2 | Changes the color of external links to en: to the internal links color. | MediaWiki:Monobook.css | |
plainlinksneverexpand | (Deprecated) Replaced with "plainlinks nourlexpansion" | ||
plainrowheaders | Changes the font style of table row headers that have the scope="row" tag applied. | MediaWiki:Common.css | |
polytonic | Font-selection fixes for Windows, for Polytonic Greek | MediaWiki:Common.css/WinFixes.css | {{polytonic}}
|
portlet | Used on the tab buttons, and the left navigation columns (in monobook) | MediaWiki:Monobook.css | skins/MonoBook.php, config/index.php |
prettytable | (Deprecated) Predecessor of wikitable. No longer works. | ||
printfooter | Used to mark the footer of the page in the interface. | ? | includes/Skin.php |
protected | (Deprecated) Used on some templates that go on protected pages. | ? | |
rcoptions | Interface section on Recent Changes page | ? | includes/specials/SpecialRecentchanges.php |
redirect-in-category | redirect in the list of members, on a category page | MediaWiki:Common.css | includes/CategoryPage.php |
redirectText | Span around the link on a redirect page | monobook/main.css | includes/Article.php |
reference | The class is assigned to the reference note links occurring within the article text and generated by Cite.php. | MediaWiki:Common.css | MediaWiki:Cite reference link |
reference-accessdate | Some (not all as of 2008-06-08) citation templates wrap the "Retrieved on date" in this class, so it can be hidden in CSS optionally or by default. | ||
references, reflist, refbegin | These classes are assigned to the ordered list of reference notes generated by Cite.php, and to the {{Reflist}} and {{Refbegin}} templates.
|
MediaWiki:Common.css | MediaWiki:Cite references prefix, MediaWiki:Cite references suffix, {{Reflist}} , {{Refbegin}}
|
references-small | (Deprecated) For small-font references in articles (in any format, not only Cite.php). To be used where the per article consensus demands smaller font for the references. (original discussion) | MediaWiki:Common.css | {{Reflist}} , {{Refbegin}} or manually assigned by editors with <div class="references-small">…</div>
|
rimage | (Deprecated) Less useful equivalent of floatright
|
monobook/main.css, common/commonPrint.css (print) | — |
rtl | "Right To Left" text direction, see ltr (Left To Right). | ||
searchButton | Used in the interface on exactly what you would expect. | monobook/main.css | skins/MonoBook.php |
selected | Used on the currently selected tab button in the interface. It changes the border-color. | monobook/main.css | includes/SkinTemplate.php, skins/MonoBook.php |
selflink | Used on links pointing to the same page (e.g. Misplaced Pages:Catalogue of CSS classes) | ? | ? |
skin-skinname | Each skin has its own name as a class in the body element. These classes allow skin-specific print/handheld rules to be easily applied. Skin name is lowercase: skin-monobook, skin-chick, skin-modern etc.
|
/includes/Skin.php | |
small | (Deprecated) Unusable way to make text/messageboxes smaller. | MediaWiki:Common.css | |
small-talk | (Deprecated) Standardized talk page templates | MediaWiki:Common.css | |
sortable | Related to sortable tables | — | wikibits.js |
sortarrow | Related to sortable tables | — | wikibits.js |
sortbottom | Related to sortable tables | — | wikibits.js |
sortheader | Related to sortable tables | — | wikibits.js |
special | Used for non-links in watchlists, etc. Like the "(diff)" on a new page. | ? | includes/QueryPage.php, includes/ImagePage.php |
subpages | used on the line listing the parent of a subpage | monobook/main.css (screen, projection) | includes/Skin.php, includes/SkinTemplate.php |
standard-talk | (Deprecated) Standardized talk page templates | MediaWiki:Common.css | |
sysop-show | Makes the red "Group notice" and "Page notice" editnotice links visible to admins. Only use this for very short items, since some browsers show hidden items to all users. | MediaWiki:Sysop.css | {{editnotice load}} |
template-documentation | For the box around template documentation. | MediaWiki:Common.css | Template:Documentation |
templatesUsed | surrounds the div listing the templates used on a page, on the edit page. | ? | includes/EditPage.php |
texhtml | applies to span element that contains a formula | common/shared.css, MediaWiki:Common.css, MediaWiki:Monobook.css, MediaWiki:Vector.css, MediaWiki:Modern.css, MediaWiki:Cologneblue.css | |
text | Class used in the interface for external links | — | includes/parser/Parser.php |
thumb | Outer div of a thumbnail. Its border (margin in monobook) is the outer "margin" for thumbnails. Also doubles as the inner padding for galleries. | chick/main.css, monobook/main.css, MediaWiki:Common.css, MediaWiki:Monobook.css, common/commonPrint.css (print) | includes/Linker.php |
thumbborder | border is specified. | chick/main.css, monobook/main.css, common/commonPrint.css (print) | includes/Linker.php |
thumbcaption | Div with the thumbnail's caption. | common/shared.css, chick/main.css, monobook/main.css, common/commonPrint.css (print) | includes/Linker.php |
thumbimage | On the thumnail. | monobook/main.css | includes/Linker.php |
thumbinner | Inner div of a thumbnail. | monobook/main.css, MediaWiki:Common.css | includes/Linker.php |
tleft, tright | Floated thumbnails | common/commonPrint.css (print) | includes/Linker.php |
tmbox, tmbox-* | Talk page message box template styles. See also mbox-text etc. above. |
MediaWiki:Common.css | {{tmbox}} meta-template that is used to create most talk page message boxes.
|
toc, toctitle, toclevel-1, toclevel-2, toctext, tocnumber, toctoggle | Used by the Table of Contents. Should not be used by anything else; use class="toccolours" or a more semantic class (like "navbox") instead. | monobook/main.css, common/commonPrint.css (print) | skin on TOC |
toccolours | Same formatting as class="toc", but can be used by other things. | common/oldshared.css, chick/main.css, modern/main.css, monobook/main.css, vector/main-ltr.css, MediaWiki:Modern.css, MediaWiki:Monobook.css | lots of places |
topicon | Formatting for top right icons like featured article star, protected page etc. | MediaWiki:Monobook.css | {{top icon}} , {{pp-meta}} , {{Spoken Misplaced Pages boilerplate}} , {{Featured article}}
|
unsortable | Related to sortable tables | — | wikibits.js |
userlinks | Username, for unambiguous letterforms like l, 1, i. | - | {{userlinks}}
|
usermessage | "You have new messages" box | monobook/main.css (screen, projection), modern/main.css (screen, projection) | - |
Unicode | Font-selection fixes for Windows, for unusual Unicode characters | MediaWiki:Common.css/WinFixes.css | {{Unicode}}
|
visualClear | applies the style "clear:both", because floats are used to position the 2 columns in monobook | monobook/main.css (screen, projection) | includes/templates/Userlogin.php, skins/MonoBook.php |
watchlistredir | For redirects on Special:Watchlist/edit | Special:Watchlist/edit | |
wikitable | For content tables | common/shared.css | everywhere |
wpb | For WikiProject banner tables. | MediaWiki:Common.css | {{WPBannerMeta}} and other WikiProject banners
|
wpb-header | For the header row of a WikiProject banner. | MediaWiki:Common.css | {{WPBannerMeta}} and other WikiProject banners
|
wpbs | For WikiProject banner shells | MediaWiki:Common.css | {{WikiProjectBannerShell}}
|
class | description | in CSS¹ | in HTML¹ |
Other classes
The following should perhaps also be added to the above table:
- Microformat classes as listed in Microformat classes.
robots-nocontent
- reserved, per
IDs
id | Description | in CSS/JS | in HTML |
---|---|---|---|
about | Part of the interface (footer). | ||
allmessagestable | Table with a list of system messages available in the MediaWiki: namespace. | monobook/main.css | Special:Allmessages |
article | Main content area for standard-derived skins. Everything on MediaWiki:Common.css must have any effect only within the element with this ID. | standard-derived skins around content | |
bodyContent | Main content area for monobook-derived skins. Everything on MediaWiki:Common.css must have any effect only within the element with this ID. | monobook/main.css (screen, projection) | monobook-derived skins around content |
collapsibleTablen, collapsibleButtonn | Used by the collapsible tables code | MediaWiki:Monobook.js | MediaWiki:Monobook.js |
column-content | part of the rendered page structure | monobook/main.css (screen, projection), common/commonPrint.css (print) | ? |
column-one | part of the rendered page structure | monobook/main.css (screen, projection), common/commonPrint.css (print) | ? |
confirmemail | Notice asking for users to confirm their email address | ? | MediaWiki:Recentchangestext, MediaWiki:Watchdetails, Misplaced Pages:Administrators' noticeboard/Header |
content | part of the rendered page | monobook/main.css (screen, projection), common/commonPrint.css (print) | ? |
contentSub | surrounds the notice of the partents of subpages | monobook/main.css (screen, projection) | ? |
coordinates | Used to show the coordinates below the page title (original discussion, talk page) | MediaWiki:Monobook.css | {{coord/display/inline,title}} |
copyright | Part of the interface (footer). | ||
delete-reason delete-criterion |
Added by deletion templates (CSD/XfD/PROD); picked up by JavaScript and used to preload the deletion summary when such pages are deleted. | MediaWiki:Sysop.js | CSD, XfD and PROD deletion templates |
differences-prevlink | Used in the diff pages | ? | ? |
disambig | (Deprecated) Old disambiguation notices style. And it used to trigger the display of {{disambig editintro}} when editing a disambig page. | MediaWiki:Common.css MediaWiki:Common.js | Was used in {{dmbox}} and disambig boxes built with it. |
disambigbox | Triggers the display of {{disambig editintro}} when editing a disambig page. | MediaWiki:Common.js | Used in {{dmbox}} and disambig boxes built with it. |
disclaimer | Part of the interface (footer). | ||
editform | Part of the interface. | includes/EditPage.php | |
editpage-copywarn | Part of the interface. | includes/EditPage.php | |
editpage-copywarn2 | Part of the interface. | MediaWiki:Edittools | |
editpage-copywarn3 | Part of the interface. | MediaWiki:Edittools | |
editpage-specialchars | Part of the interface. | MediaWiki:Edittools.js, MediaWiki:Common.js/edit.js | MediaWiki:Edittools |
footer | part of the rendered page | common/commonPrint.css (print) | ? |
GeoGroupTemplate | Allow direct referencing of box (used once per page) containing map links | (none) | {{GeoGroupTemplate}} |
globalWrapper | surrounds the whole page | monobook/main.css (screen, projection), common/commonPrint.css (print) | ? |
jump-to-nav | Links to jump to the navigation or the search bar, mainly for screen readers. | monobook/main.css (screen, projection) common/commonPrint.css (print) | ? |
lastmod | Part of the interface. | ||
longpagewarning | Allows hiding of the "long page" warning via user CSS | MediaWiki:Longpagewarning | |
mw-youhavenewmessages | So JavaScript can find the "You have new messages" text in all skins. | MediaWiki:Youhavenewmessages | |
NavFramen, NavTogglen | Used by the experimental Dynamic Navigation Bars code | MediaWiki:Monobook.js | MediaWiki:Monobook.js |
privacy | Part of the interface. | ||
searchBody | Part of the interface. | ||
searchGoButton | Part of the interface. | ||
searchInput | Part of the interface. | ||
searchform | Part of the interface. | ||
searchTarget | ? | monobook/main.css | ? |
searchTargetContainer | ? | monobook/main.css | ? |
shared-image-desc | Wrapper around the image description from commons | includes/ImagePage.php | |
siteNotice | Site notices | MediaWiki:Monobook.css, chick/main.css, monobook/main.css, common/wikiprintable.css (hidden), common/commonPrint.css (hidden) | skin around MediaWiki:Sitenotice, skin around MediaWiki:Anonnotice |
siteSub | MediaWiki:Tagline - "", appears under the page title. | MediaWiki:Monobook.css, monobook/main.css (hidden) | |
stub | Stub notices (wikiproject) | monobook/main.css (screen, projection) (only on links, i.e. A elements) common/commonPrint.css (print) | {{stub}}, all stub templates (list) |
tfd | Template:Catfd | ? | {{Catfd}}, {{tfd}} |
toc, toctitle | Table of Contents | common/commonPrint.css (print) | skin on TOC |
top | anchor at the top of the page, used for links that go "back to the top" | ? | ? |
villagepumpfaq | Allows the user to hide the FAQ on the top of Misplaced Pages:Village pump (technical) | Misplaced Pages:Village pump (technical) | |
wikiPreview | Part of the interface. |
ca-X, f-X, n-X, p-X, pt-X, t-X, wpX IDs
i.e. interface buttons, links, etc.
id | Description | in CSS¹ | in HTML¹ |
---|---|---|---|
ca-addsection | "+" or "new section" tab button on top of talk pages. | monobook/main.css and MediaWiki:Monobook.css. | ? |
ca-delete | Delete tab button | ? | ? |
ca-edit | edit this page tab button | MediaWiki:Monobook.css | ? |
ca-history | History tab button | ? | ? |
ca-move | Move tab button | ? | ? |
ca-nstab-user | ? | ? | ? |
ca-nstab-wp | Misplaced Pages project page tab button | ? | ? |
ca-protect | Protection tab button | ? | ? |
ca-talk | Talk page tab button | ? | ? |
ca-unwatch | Unwatch tab button | ? | ? |
f-poweredbyico | Powered by MediaWiki icon in the footer | common/commonPrint.css (print) | ? |
f-copyrightico | Copyright Wikimedia Foundation in the footer | common/commonPrint.css (print) | ? |
f-list | Part of the interface. | ||
n-Featured-articles | Part of the interface. | ||
n-contact | Part of the interface. | ||
n-currentevents | Part of the interface. | ||
n-help | Part of the interface. | ||
n-mainpage | Part of the interface. | ||
n-portal | Part of the interface. | ||
n-randompage | Part of the interface. | ||
n-recentchanges | Part of the interface. | ||
n-sitesupport | Part of the interface. | ||
p-cactions | Sets padding, margin, placement and colours of the page top tab buttons in Monobook. | monobook/main.css and MediaWiki:Monobook.css. | ? |
p-personal | Surrounds the "personal toolbar", i.e. userpage, talk page, prefs, watchlist, contribs, log out. | monobook/main.css (screen, projection) | ? |
p-logo | Surrounds the logo image | ? | ? |
p-nav | ? | ? | ? |
p-navigation | surrounds the Navigation menu; i.e. Main page, Community Portal, etc… | ? | ? |
p-tb | surrounds the toolbox meun; i.e. whatlinkshere, related changes, etc… | ? | ? |
pt-login | ? | MediaWiki:Monobook.css | ? |
pt-userpage | Userpage link personal toolbar link | ? | ? |
pt-logout | Part of the interface. | ||
pt-mycontris | Part of the interface. | ||
pt-mytalk | Part of the interface. | ||
pt-preferences | Part of the interface. | ||
pt-watchlist | Part of the interface. | ||
t-permalink | Part of the interface. | ||
t-recentchangeslinked | Part of the interface. | ||
t-specialpages | Part of the interface. | ||
t-upload | Part of the interface. | ||
t-whatlinkshere | Part of the interface. | ||
wpSave | Save button | monobook/main.css | ? |
wpDiff | Part of the interface. | ||
wpMinoredit | Part of the interface. | ||
wpPreview | Part of the interface. | ||
wpScrolltop | Part of the interface. | ||
wpSummary | Part of the interface. | ||
wpSummaryLabel | Part of the interface. | ||
wpTextbox1 | Part of the interface. | ||
wpWatchthis | Part of the interface. |
JavaScript variables
About 30 variables that can be used in JavaScript. View the rendered code of any page and find for instance "var wgUserName
".
Notes
- In some special cases in JavaScript.
See also
- Misplaced Pages:WikiProject User scripts
- Misplaced Pages:Useful styles
- Help:User style
- Help:Cascading style sheets