Vorlage:Cmbox/Doku: Unterschied zwischen den Versionen
imported>Davidgothberg (→See also: Added links to the rest of the meta-templates in the mbox family.) |
imported>Davidgothberg (→Technical details: Updated the docs since we now use the CSS classes in MediaWiki:Common.css. And added an explanation why we use png images instead of svg images.) |
||
Zeile 161: | Zeile 161: | ||
=== Technical details === | === Technical details === | ||
If you need to use special characters in the text parameter then you need to escape them like this: | If you need to use special characters in the text parameter then you need to escape them like this: | ||
Zeile 184: | Zeile 182: | ||
}} | }} | ||
This template uses CSS classes for most of its looks, thus it is fully skinnable. | |||
Internally this meta-template uses HTML markup instead of wiki markup for the table code. That is the usual way we make meta-templates since wiki markup has several drawbacks. For instance it makes it harder to use [[m:Help:ParserFunctions|parser functions]] and special characters in parameters. | Internally this meta-template uses HTML markup instead of wiki markup for the table code. That is the usual way we make meta-templates since wiki markup has several drawbacks. For instance it makes it harder to use [[m:Help:ParserFunctions|parser functions]] and special characters in parameters. | ||
The default images for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg images. The png images here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons doesn't look that bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons. | |||
For more technical details see the [[Template talk:Cmbox|talk page]]. Since this template works almost exactly like {{tl|ambox}} and {{tl|imbox}} their talk pages and related pages might also contain more details. | For more technical details see the [[Template talk:Cmbox|talk page]]. Since this template works almost exactly like {{tl|ambox}} and {{tl|imbox}} their talk pages and related pages might also contain more details. | ||
Zeile 198: | Zeile 200: | ||
* {{tl|ombox}} – For other pages message boxes. | * {{tl|ombox}} – For other pages message boxes. | ||
* {{tl|mbox}} – Has namespace detection, for message boxes that are used on several types of pages and thus need to change style depending on what page they are used on. | * {{tl|mbox}} – Has namespace detection, for message boxes that are used on several types of pages and thus need to change style depending on what page they are used on. | ||
Other pages: | |||
* [[MediaWiki:Common.css]] – The cmbox CSS classes that this meta-template uses are declared at that page. | |||
<includeonly> | <includeonly> |