Jump to content

Wikipedia:Catalogue of CSS classes/Templates

From Wikipedia, the free encyclopedia

This page is for CSS (and HTML) classes used in templates or in Lua Scribunto modules, when the classes are shared between templates or modules.

Please do not add:

  • Template classes that are just the template name (or a modification thereof) and serve no purpose but indicating "this class identifies the output of this template". There are literally thousands of these, and in theory every template that has visible output could, maybe even should, have its own class named after the template.
  • Template classes that already appear in site-wide CSS interface pages like MediaWiki:Common.css. These should be listed at WP:Catalogue of CSS classes instead.

Make exceptions for (do add):

  • Template classes named after an original template but also used by other templates.
  • Template classes named after an original template but also intended to be used by other templates (e.g. for a series of templates you are still developing).
  • Template classes named after a template which are part of a series of interacting template classes (e.g. if a wrapper template has class foo and some subtemplates use it, but some use variants like foo1 or foo-small they can be listed as part of the foo "system".
  • Template classes named after a module, since numerous templates may invoke that module.

Only classes should appear here. Templates should not be using CSS/HTML IDs, only classes, since IDs must be unique on each page and the entire point of templates is that they're used repeatedly (often multiple times on the same page – articles can even have more than one infobox). If you've encountered a template using a fixed ID instead of a class this is probably an error, and you may wish to fix it if you're sure, or raise a discussion about the matter on its talk page.

[list forthcoming, building it in a sandbox. Start with: glossaries, code and key templates, userlinks]

Class Description Templates that use it
userlinks Wrapper around the entire block of user-related links created by the template {{Userlinks}}, {{User summary}}, {{IP summary}}, {{IPuser}}, {{Useranon}}, {{Usercf}}, {{User plus}}, {{User-dev}}, {{User21}}, {{User-c}}, {{User-c-name}}, {{User-t}}, {{User-t2}}, {{Useracc}}; {{UserBk}}, {{Userblock}}
may soon by added to Module:UserLinks, and thus to {{User-multi}}, etc.
userlinks-usename Just the username; giving this font-family: monospace helps distinguish between 1 / l / I, and O / 0
example Semantic markup of examples, e.g. in guideline pages {{xt}}, {{xt2}}, {{!xt}}, {{!xt2}}, {{xtd}}, {{bxt}}, {{!bxt}}, {{bxtd}}, {{bxtn}}, {{mxt}}, {{!mxt}}, {{mxtd}}, {{mxtn}}.
(Good example is the default presumption: {{xt}}, {{bxt}}, {{mxt}}. There is no special class for this.)
example-block Display markup of blocks of example content {{xt2}}, {{!xt2}}
example-bad Semantic markup of bad (invalid or strongly deprecated) examples
Not a subset of example-deprecated; both are refinement subsets of deprecated-content.
{{!xt}}, {{!bxt}}, {{!mxt}}
example-bold Boldfaced display markup of examples {{bxt}}, {{!bxt}}, {{bxtd}}, {{bxtn}}
example-deprecated Semantic markup of deprecated examples.
Not a superset of example-bad; both are refinement subsets of deprecated-content.
{{xtd}}, {{bxtd}}, {{tlx|mxtd}
example-mono Monospaced display markup of examples of code.
Subset of monospaced.
{{mxt}}, {{!mxt}}, {{mxtd}}, {{tlx|mxtn}
deprecated-content Semantic markup of content that has been deprecated.
Superset of example-bad and example-deprecated.
{{dc}}, {{dc2}}, {{dcr}}, {{xtd}}, {{bxtd}}, {{mxtd}}
monospaced Content marked up with font-family: monospace; (or a font stack that ends with monospace).
Superset of example-mono.
{{mxt}}, {{!mxt}}, {{mxtd}}, {{tlx|mxtn}, ...
{{[[Template:|]]}}
{{[[Template:|]]}}
{{[[Template:|]]}}
{{[[Template:|]]}}
{{[[Template:|]]}}
{{[[Template:|]]}}
{{[[Template:|]]}} {{[[Template:|]]}}