Modifications

Aller à : navigation, rechercher

Modèle:Mbox/doc

87 octets ajoutés, 11 août 2014 à 13:49
m
remove broken links
| type = style
| small = left
| image = [[File:200px-Emblem-question-yellow.svg.png|40px|alt=Question mark]]| smallimage = [[File:200px-Emblem-question-yellow.svg.png|20px|alt=Question mark]]
| textstyle = color: red; font-weight: bold; font-style: italic;
| text = Text for a big box, for the top of articles.
| type = style
| small = left
| image = [[File:200px-Emblem-question-yellow.svg.png|40px|alt=Question mark]]| smallimage = [[File:200px-Emblem-question-yellow.svg.png|20px|alt=Question mark]]
| textstyle = color: red; font-weight: bold; font-style: italic;
| text = Text for a big box, for the top of articles.
:'''No parameter''' = If no '''image''' parameter is given the template uses a default image. Which default image it uses depends on the '''type''' parameter.
:'''An image''' = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems, unless you also set imagewidth.)
:: Often an icon is [[Wikipedia:Alternative text for images #Purely decorative images|purely decorative]] in the W3C sense that it repeats the text. To improve [[Wikipedia:Accessibility|accessibility]], it is desirable to not have it be announced by [[screen reader]]sreaders, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with "{{para|link}}{{para|alt}}". For example:
:::<code><nowiki>image = [[File:Unbalanced scales.svg|40px|link=|alt=]]</nowiki></code>
:: Conversely, an icon that does not use "{{para|link}}{{para|alt}}", and which therefore is announced to visually impaired readers, should use an "{{para|alt|<var>[[Wikipedia:Alternative text for images|alt text]]</var>}}" parameter that describes the icon. With no {{para|link}} parameter (using the default link), the alt text should describe the icon's visual appearance. For example:
'''imagewidth'''
:Optional [[whttp:Cascading Style Sheets|//en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]] value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
:'''Example'''
:: <code>imagewidth=100px</code>
'''imagerightwidth'''
:Optional [[whttp:Cascading Style Sheets|//en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]] value used to set width of image's div section. Allowing you to use images wider than the default 52px wide.
:'''Example'''
:: <code>imagerightwidth=100px</code>
'''style'''
:Optional [[Cascading Style Sheets|http://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]] values used by the entire message box table. Without quotation marks <code>" "</code> but with the ending semicolons <code>;</code>. For example:
::<code>style = margin-bottom: 0.5em;</code>
'''textstyle'''
:Optional [[Cascading Style Sheets|http://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS]] values used by the text cell. For example:
::<code>textstyle = text-align: center;</code>
This template calls {{Tnull|mbox/core}} which holds most of the code for {{Tnull|mbox}}, while {{Tnull|mbox}} itself does parameter preprocessing.
Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use [[mhttp://meta.wikimedia.org/wiki/Help:ParserFunctions|Parser_function parser functions]] and some 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 only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

Menu de navigation