Template:Message/box/doc: Difference between revisions

(→‎class: Corr.)
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
__NOTOC__
==Usage==
==Usage==
{{tl|message/box}} displays a custom made message box, just as {{tl|message}}, but with the added option to define the maximum width of the box. Furthermore, the image is automatically given an alternative text, and the image shown at the page is non-clickable (i.e. it doesn't link to the original file when clicked).
{{tl|message/box}} displays a custom made message box, just as {{tl|message}}, but with some added options:
* message title
* maximum box width
* image float
* custom image alt text
* custom image link (default: no link)
* text alignment
* text direction
* Mozilla colours available for the background and border
* Mozilla colours available for the foreground


The two default colours for the background and the border, [[Template:Color/Mozilla/sand_start|''sand start'']] and [[Template:Color/Mozilla/sand|''sand'']] respectively, are set in accordance with the [https://www.mozilla.org/en-US/styleguide/identity/mozilla/color/ Mozilla style guide]. These two and the remaining Mozilla colours have been given their own values for easy use.
__TOC__
==Parameters==
==Parameters==
{| class="wikitable"
There are 14 parameters in total, 1 unnamed and 13 named, none of which is required for the template to work. Some parameters will affect other parameters or CSS properties if entered, or if set to a specific value. Read the descriptions of the parameters below to learn about these cases.
 
;<big>List of parameters</big>
{| class="wikitable" style="background-color: white;"
|-
! colspan="4" | Template parameters
|-
! Element !! Parameter !! Description !! Default value
|-
| rowspan="5" | Box || {{code|class}} || CSS class amendment || {{samp|''null''}}
|-
| {{code|bgcolor}} || Background colour || style="background-color: #f6f4ec;" | {{samp|#f6f4ec}}
|-
| {{code|bdcolor}} || Border colour || style="background-color: #d7d3c8;" | {{samp|#d7d3c8}}
|-
| {{code|width}} || Box width || {{samp|none}}
|-
|-
! Parameter !! Description
| {{code|style}} || Additional CSS styling || {{samp|''null''}}
|-
|-
| <code>class</code> || Custom CSS class amendment
| rowspan="5" | Image || {{code|image}} || Image shown in the box || {{samp|Idea.png}} [[File:Idea.png|25px|alt=|link=]]
|-
|-
| <code>bgcolor</code> || Background colour
| {{code|imgwidth}} || Image width || {{samp|35}} (px)
|-
|-
| <code>bdcolor</code> || Border colour
| {{code|float}} || Image float || {{samp|left}}
|-
|-
| <code>fgcolor</code> || Foreground (text) colour
| {{code|imgalt}} || Image alt text || {{samp|''image file name''}}
|-
|-
| <code>image</code> || Image to be shown in the box
| {{code|imglink}} || Image link || {{samp|''empty''}}
|-
|-
| <code>imgwidth</code> || Image width (in pixels)
| rowspan="5" | Text || {{code|1}} ''(unnamed)'' || Message text || {{samp|''null''}}
|-
|-
| <code>width</code> || Box width (in percent of available width)
| {{code|title}} || Messagebox title (header) || {{samp|''null''}}
|-
|-
| <code>style</code> || Custom CSS styling
| {{code|fgcolor}} || Foreground (text) colour || {{samp|black}}
|-
| {{code|talign}} || Text alignment || {{samp|left}}
|-
| {{code|tdir}} || Text direction || {{samp|ltr}}
|}
|}


;<big>Copy-paste templates</big>
;<big>Copy-paste templates</big>
{| class="wikitable"
{| class="wikitable" style="background-color: white;"
|-
! Size !! Template code
|-
| Basic || {{tlc|message/box|''text''|title{{=}}}}
|-
| Common use || {{tlc|message/box|''text''|title{{=}}|bgcolor{{=}}|bdcolor{{=}}|width{{=}}|image{{=}}|float{{=}}}}}}
|-
| All parameters || {{tlc|message/box|''text''|title{{=}}|class{{=}}|bgcolor{{=}}|bdcolor{{=}}|width{{=}}|style{{=}}|image{{=}}|imgwidth{{=}}|float{{=}}|imgalt{{=}}|imglink{{=}}|fgcolor{{=}}|talign{{=}}|tdir{{=}}}}
|}
 
===Box parameters===
====class====
;<big>Class</big>
A custom [[Wikipedia:Cascading Style Sheets|CSS]] class to append to the box's default class {{samp|messagebox}}.
 
If you, for exampl0e, set the value to {{samp|german}}, the resulting {{tag|div|o}} attribute will be {{tag|div|o|params=class="messagebox german"}}.
 
The default value is {{samp|''null''}}.
 
;<big>Usage</big>
* {{tlc|message/box|class{{=}}class name}}
 
====bgcolor====
;<big>Background colour</big>
The background colour of the box, defined as a Mozilla colour value (see the table below), a CSS colour name (e.g. {{samp|white}}) or a hexadecimal colour code (e.g. {{samp|#ffffff}} for white).
 
The default value is {{samp|#f6f4ec}}&nbsp; (Mozilla colour "[[Template:Color/Mozilla/sand_start|''sand (gradient start)'']]").
 
;<big>Usage</big>
* {{tlc|message/box|bgcolor{{=}}colour code/value}}
 
;<big>Available values</big>
{| class="wikitable" style="background-color: white;"
|-
! style="width:1.75em;" | !! Value !! Hex !! Comment
|-
| style="background-color: #f6f4ec;" | || {{samp|lmozsand}} || {{samp|#f6f4ec}} || '''Default'''
|-
| style="background-color: #d7d3c8;" | || {{samp|mozsand}} || {{samp|#d7d3c8}} ||
|-
| style="background-color: #ea3b28;" | || {{samp|lmozred}} || {{samp|#ea3b28}} ||
|-
| style="background-color: #c13832;" | || {{samp|mozred}} ||{{samp|#c13832}} ||
|-
| style="background-color: #4d4e53;" | || {{samp|mozcoal}} || {{samp|#4d4e53}} ||
|-
| style="text-align: center;" | HEX || Any hex colour value || {{samp|#RRGGBB}} ||
|-
| style="text-align: center;" | CSS || Any CSS colour name ||  ||
|}
 
====bdcolor====
;<big>Border colour</big>
The border colour of the box, defined as a Mozilla colour value (see the table below), a CSS colour name (e.g. {{samp|black}}) or a hexadecimal colour code (e.g. {{samp|#000000}} for black).
 
The default value is {{samp|#d7d3c8}}&nbsp; (Mozilla colour "[[Template:Color/Mozilla/sand|''sand'']]").
 
;<big>Usage</big>
* {{tlc|message/box|bdcolor{{=}}colour code/value}}
 
;<big>Available values</big>
{| class="wikitable" style="background-color: white;"
|-
! style="width:1.75em;" | !! Value !! Hex !! Comment
|-
| style="background-color: #f6f4ec;" | || {{samp|lmozsand}} || {{samp|#f6f4ec}} ||
|-
| style="background-color: #d7d3c8;" | || {{samp|mozsand}} || {{samp|#d7d3c8}} || '''Default'''
|-
| style="background-color: #ea3b28;" | || {{samp|lmozred}} || {{samp|#ea3b28}} ||
|-
| style="background-color: #c13832;" | || {{samp|mozred}} ||{{samp|#c13832}} ||
|-
| style="background-color: #4d4e53;" | || {{samp|mozcoal}} || {{samp|#4d4e53}} ||
|-
| style="text-align: center;" | HEX || Any hex colour value || {{samp|#RRGGBB}} ||
|-
| style="text-align: center;" | CSS || Any CSS colour name ||  ||
|}
 
====width====
;<big>Box width</big>
You can define the maximum width of the message box in pixels, or as a percentage of the available width.
 
The default value is {{samp|none}}.
 
;<big>Comment</big>
* When defining the message box width, enter the numerical value and the unit ({{samp|%}} or {{samp|px}}) as one word, i.e without any spaces, e.g. {{samp|60%}} or {{samp|350px}}.
 
;<big>Usage</big>
* {{tlc|message/box|width{{=}}numerical value and unit}}
 
====style====
;<big>CSS styling</big>
Optional CSS properties with corresponding values. This parameter specifies the style used by the entire message box.
 
The default value is {{samp|''null''}}.
 
;<big>Comments</big>
* Properties have to be enetered without quotation marks ({{samp|"…"}}) but with the ending semicolon ({{samp|;}}).
* Don't define properties that already are regulated by other parameters in this template.
 
;<big>Usage</big>
* {{tlc|message/box|style{{=}}prop1:value1; prop2:value2;}}
 
===Image parameters===
====image====
;<big>Image</big>
You can choose a custom image to be used in the template, by using the ''image'' parameter. By default, the image is displayed on the left side inside the box, to the left of the text.
 
The default image is {{samp|Idea.png}} ([[:File:Idea.png]]).
 
;<big>Comments</big>
* The image must previously have been uploaded to MozillaWiki. See {{category|Icons}} or the MozillaWiki [[Special:ListFiles|file list]].
* When defining an image, don't include the namespace ({{samp|File:}}). That is inserted automatically.
 
;<big>Usage</big>
* {{tlc|message/box|image{{=}}name.ext}}
 
====imgwidth====
;<big>Image width</big>
The width of the used image (in pixels), defined as a numerical value.
 
The default value is {{samp|35}}.
 
;<big>Comments</big>
* When defining the image width, don't include the unit ({{samp|px}}). That is inserted automatically.
* The image width affects the margin of the box, allowing it to float without getting covered by text.
 
;<big>Usage</big>
* {{tlc|message/box|imgwidth{{=}}numerical value}}
 
====float====
;<big>Image float</big>
You can change the image's float to floating on the right-hand side, or to no float at all.
 
The default value is {{samp|left}}.
 
;<big>Comment</big>
* Setting the float value to {{samp|right}} affects the left- and right-hand margins of the box, shifting them to give the image the space it needs on the right (so it doesn't get covered by text), and allowing extra space for the text on the left.
 
;<big>Usage</big>
* {{tlc|message/box|float{{=}}float value}}
 
;<big>Available values</big>
{| class="wikitable" style="background-color: white;"
|-
|-
! Size !! Code
! Value !! style="width:15em;" | Comment
|-
|-
| Basic || <code><nowiki>{{message/box|''text''}}</nowiki></code>
| {{samp|left}} || <div style="float:left;">[[File:Idea.png|25px|alt=|link=]]</div> <div>'''Default'''</div>
|-
|-
| Common use || <code><nowiki>{{message/box|''text'' |bgcolor= |bdcolor= |image= |width= }}</nowiki></code>
| {{samp|right}} || <div style="float:right;">[[File:Idea.png|25px|alt=|link=]]</div> <div>Image floats to the right</div>
|-
|-
| All parameters || <code><nowiki>{{message/box|''text'' |class= |bgcolor= |bdcolor= |fgcolor= |image= |imgwidth= |width= |style= }}</nowiki></code>
| {{samp|none}} || <div style="float:none;">[[File:Idea.png|25px|alt=|link=]]</div> <div>No floating, image treated <br>as a separate block</div>
|}
|}
===Mandatory parameter===
====Text====
;<big>1</big>
Custom text string, wiki-formatting can be used. The parameter is unnamed, so no parameter name needs to be entered.


Note:
====imgalt====
* If this parameter is left out, its name in the template code, "<code><nowiki>{{{1}}}</nowiki></code>", will be displayed.
;<big>Image alt text</big>
By default, the image's alt text is the same as the image's name, e.g. "{{samp|Idea.png}}" for the default image. But it is possible to specify a custom alt text using this parameter.


;Usage:
;<big>Usage</big>
* <code><nowiki>{{message/box|''text''}}</nowiki></code>
* {{tlc|message/box|imgalt{{=}}custom text}}


===Optional parameters===
====imglink====
====CSS class====
;<big>Image link</big>
;<big>class</big>
By default, the image link is disabled, but it is possible to specify a custom link with this parameter.
A custom [[Wikipedia:Cascading Style Sheets|CSS]] class to append to the box's default class <code>messagebox</code>, e.g. <code>messagebox ''small''</code>.


;Usage:
The default value is {{samp|''null''}}.
* <code><nowiki>{{message/box|1|class=class name}}</nowiki></code>


====Colours====
;<big>Comments</big>
;<big>bgcolor</big>
* When entering an internal wikilink, don't include the brackets ({{samp|<nowiki>[[…]]</nowiki>}}). Example: {{samp|L10n:Home Page}}
The background colour of the box, defined as a CSS colour name (e.g. <code>white</code>) or a hexadecimal colour code, e.g. <code>#ffffff</code> for white. The default colour is <code>#f9f6b7</code>.
* When entering an URL, include the protocol ({{samp|http://}}, {{samp|https://}}, etc.). Example: {{samp|<nowiki>https://www.mozilla.org/sv-SE/</nowiki>}}


;Usage:
;<big>Usage</big>
* <code><nowiki>{{message/box|1|bgcolor=CSS/hex colour}}</nowiki></code>
* {{tlc|message/box|imglink{{=}}wikilink/URL}}


;<big>bdcolor</big>
===Text parameters===
The border colour of the box, defined as a CSS colour name (e.g. <code>black</code>) or a hexadecimal colour code, e.g. <code>#000000</code> for black. The default colour is <code>#c4c295</code>.
====1 (unnamed)====
;<big>Message text</big>
Custom text string, wiki-formatting can be used. The parameter is unnamed, so no parameter name needs to be entered.


;Usage:
The default value is {{samp|''null''}}, but without defining this parameter, i.e. including a message, the template is more or less useless as a message box.
* <code><nowiki>{{message/box|1|bdcolor=CSS/hex colour}}</nowiki></code>


;<big>fgcolor</big>
;<big>Usage</big>
The foreground colour of the box (i.e. text colour), defined as a CSS colour name (e.g. <code>green</code>) or a hexadecimal colour code (e.g. <code>#008000</code> for green). The default colour is <code>black</code>.
* {{tlc|message/box|custom text}}


;Usage:
====title====
* <code><nowiki>{{message/box|1|fgcolor=CSS/hex colour}}</nowiki></code>
;<big>Message title</big>
Custom text string, output in bold and larger text-size. The message text will be displayed one line beneath the title.


====Image====
The default value is {{samp|''null''}}.
;<big>image</big>
You can choose a specific image to use for the template by using the ''image'' parameter. The image is displayed on the left side in the box, to the left of the text. The default image is <code>Idea.png</code> ([[:File:Idea.png]]).


Notes:
;<big>Usage</big>
* When defining an image, don't include the namespace (<code>File:</code> or <code>Image:</code>). That is inserted automatically.
* {{tlc|message/box|title{{=}}custom text}}
* The image's alt text is the same as the image's name. Thus, the default is "<code>Idea.png</code>".


;Usage:
====fgcolor====
* <code><nowiki>{{message/box|1|image=name.ext}}</nowiki></code>
;<big>Foreground colour</big>
The foreground colour of the box (i.e. text colour), defined as a Mozilla colour value (see the table below), a CSS colour name (e.g. {{samp|black}}) or a hexadecimal colour code (e.g. {{samp|#000000}} for black).


;<big>imgwidth</big>
The default colour is {{samp|black}} (i.e the CSS name value).
The width of the used image (in pixels). The default value is <code>35</code>.


Note:
;<big>Usage</big>
* When defining the image width, don't include the unit (<code>px</code> or <code>pixels</code>). That is inserted automatically.
* {{tlc|message/box|fgcolor{{=}}colour code/value}}


;Usage:
;<big>Available values</big>
* <code><nowiki>{{message/box|1|imgwidth=number value}}</nowiki></code>
{| class="wikitable" style="background-color: white;"
|-
! style="width:1.75em;" | !! Value !! Hex
|-
| style="background-color: #f6f4ec;" | || {{samp|lmozsand}} || {{samp|#f6f4ec}}
|-
| style="background-color: #d7d3c8;" | || {{samp|mozsand}} || {{samp|#d7d3c8}}
|-
| style="background-color: #ea3b28;" | || {{samp|lmozred}} || {{samp|#ea3b28}}
|-
| style="background-color: #c13832;" | || {{samp|mozred}} ||{{samp|#c13832}}
|-
| style="background-color: #4d4e53;" | || {{samp|mozcoal}} || {{samp|#4d4e53}}
|-
| style="text-align: center;" | HEX || Any hex colour value || {{samp|#RRGGBB}}
|-
| style="text-align: center;" | CSS || Any CSS colour name ||
|}
 
====talign====
;<big>Text alignment</big>
The alignment of the text, defined using CSS values.
 
The default value is {{samp|left}}.
 
;<big>Usage</big>
* {{tlc|message/box|talign{{=}}alignment value}}
 
;<big>Available values</big>
{| class="wikitable" style="background-color: white;"
|-
! Value !! style="width:15em;" | Comment
|-
| {{samp|left}} || style="text-align:left;" | '''Default'''
|-
| {{samp|right}} || style="text-align:right;" | Right-aligned
|-
| {{samp|center}} || style="text-align:center;" | Center-aligned
|}


====Box width====
====tdir====
;<big>width</big>
;<big>Text direction</big>
You can define the maximum width of the message box (in percent of the available width). The default value is <code>100</code> (full width).
The direction of the text, defined using CSS values.


Note:
The default value is {{samp|ltr}}.
* When defining the message box width, don't include the unit (<code>%</code>). That is inserted automatically.


;Usage:
;<big>Comments</big>
* <code><nowiki>{{message/box|1|width=number value}}</nowiki></code>
* Only use this parameter if you need to enter a message in a language, in which written text runs from the right to the left, e.g. Arabic, Persian or Hebrew.
* If you use this parameter, '''do not''' also use the parameter {{para|talign}}! It is preset for {{para|tdir|rtl}}.
** Setting the direction value to {{samp|rtl}} will impose the following property change:
**# {{para|talign}}: the text will be set to {{samp|right}}, making the text right-aligned.


====CSS styling====
;<big>Usage</big>
;<big>style</big>
* {{tlc|message/box|tdir{{=}}direction value}}
Optional CSS properties with corresponding values may be defined, without quotation marks <code>" "</code> but with the ending semicolons <code>;</code>. The parameter specifies the style used by the entire message box.


;Usage:
;<big>Available values</big>
* <code><nowiki>{{message/box|1|style=property1:value1; property2:value2;}}</nowiki></code>
{| class="wikitable" style="background-color: white;"
|-
! Value !! style="width:15em;" | Comment
|-
| {{samp|ltr}} || style="text-align:left; direction:ltr;" | '''Default'''
|-
| {{samp|rtl}} || style="text-align:right; direction:rtl;" | {{bdi|كتب النص من اليمين إلى اليسار}}
|}


==Examples==
==Examples==
===Correct use===
===Correct use===
{| class="wikitable"
{| class="wikitable" style="background-color: white;"
|-
! colspan="3" | <h4>General</h4>
|-
! Parameter !! What you write !! What you see
|-
| No parameters || {{tlc|message/box}} || {{message/box}}
|-
| colspan="3" |
|-
! colspan="3" | <h4>Box</h4>
|-
|-
! Parameter !! What you write !! What you see
! Parameter !! What you write !! What you see
|-
|-
| <code>1</code> || <code><nowiki>{{message/box|You ''can'' '''use''' <sup>wiki</sup> <big>markup</big>}}</nowiki></code> || {{message/box|You ''can'' '''use''' <sup>wiki</sup> <big>markup</big>}}
| {{code|class}} || {{tlc|message/box|Class set to {{samp|messagebox text}}|class{{=}}text}} || {{message/box|Class set to {{samp|messagebox text}}|class=text}}
|-
|-
| <code>class</code> || <code><nowiki>{{message/box|Custom text|class=text}}</nowiki></code> || {{message/box|Custom text|class=text}}
| rowspan="3" | {{code|bgcolor}} || {{tlc|message/box|CSS colour name|bgcolor{{=}}magenta}} || {{message/box|CSS colour name|bgcolor=magenta}}
|-
|-
| rowspan="2" | <code>bgcolor</code> || <code><nowiki>{{message/box|Custom text|bgcolor=white}}</nowiki></code> || {{message/box|Custom text|bgcolor=white}}
| {{tlc|message/box|Hex colour code|bgcolor{{=}}#FF00FF}} || {{message/box|Hex colour code|bgcolor=#FF00FF}}
|-
|-
| <code><nowiki>{{message/box|Custom text|bgcolor=#ffffff}}</nowiki></code> || {{message/box|Custom text|bgcolor=#ffffff}}
| {{tlc|message/box|Mozilla colour value|bgcolor{{=}}mozsand}} || {{message/box|Mozilla colour value|bgcolor=mozsand}}
|-
|-
| rowspan="2" | <code>bdcolor</code> || <code><nowiki>Custom text|bdcolor=black}}</nowiki></code> || {{message/box|Custom text|bdcolor=black}}
| rowspan="3" | {{code|bdcolor}} || {{tlc|message/box|CSS colour name|bdcolor{{=}}magenta}} || {{message/box|CSS colour name|bdcolor=magenta}}
|-
|-
| <code><nowiki>{{message/box|Custom text|bdcolor=#000000}}</nowiki></code> || {{message/box|Custom text|bdcolor=#000000}}
| {{tlc|message/box|Hex colour code|bdcolor{{=}}#FF00FF}} || {{message/box|Hex colour code|bdcolor=#FF00FF}}
|-
|-
| rowspan="2" | <code>fgcolor</code> || <code><nowiki>{{message/box|Custom text|fgcolor=green}}</nowiki></code> || {{message/box|Custom text|fgcolor=green}}
| {{tlc|message/box|Mozilla colour value|bdcolor{{=}}mozcoal}} || {{message/box|Mozilla colour value|bdcolor=mozcoal}}
|-
|-
| <code><nowiki>{{message/box|Custom text|fgcolor=#008000}}</nowiki></code> || {{message/box|Custom text|fgcolor=#008000}}
| rowspan="2" | {{code|width}} || {{tlc|message/box|Percentage|width{{=}}45%}} || {{message/box|Percentage|width=45%}}
|-
|-
| <code>image</code> || <code><nowiki>{{message/box|Custom text|image=Green check.png}}</nowiki></code> || {{message/box|Custom text|image=Green check.png}}
| {{tlc|message/box|Pixels|width{{=}}97px}} || {{message/box|Pixels|width=97px}}
|-
|-
| <code>imgwidth</code> || <code><nowiki>{{message/box|Custom text|image=Green check.png|imgwidth=75}}</nowiki></code> || {{message/box|Custom text|image=Green check.png|imgwidth=75}}
| {{code|style}} || {{tlc|message/box|Styled box|style{{=}}text-decoration:overline;font-family: fantasy, cursive, Serif;height: 75px;}} || {{message/box|Styled box|style=text-decoration:overline;font-family: fantasy, cursive, Serif;height: 75px;}}
|-
|-
| <code>width</code> || <code><nowiki>{{message/box|Custom text|width=25}}</nowiki></code> || {{message/box|Custom text|width=25}}
| colspan="3" |
|-
|-
| <code>style</code> || <code><nowiki>{{message/box|Custom text|style=text-align:right;}}</nowiki></code> || {{message/box|Custom text|style=text-align:right;}}
! colspan="3" | <h4>Image</h4>
|}
|-
 
! Parameter !! What you write !! What you see
===Incorrect use===
|-
{| class="wikitable"
| {{code|image}} || {{tlc|message/box|Custom image|image{{=}}Green check.png}} || {{message/box|Custom image|image=Green check.png}}
|-
| {{code|imgwidth}} || {{tlc|message/box|Larger image|image{{=}}Green check.png|imgwidth{{=}}75}} || {{message/box|Larger image|image=Green check.png|imgwidth=75}}
|-
| rowspan="2" | {{code|float}} || {{tlc|message/box|Floating to the right|float{{=}}right}} || {{message/box|Floating to the right|float=right}}
|-
| {{tlc|message/box|Not floating|float{{=}}none}} || {{message/box|Not floating|float=none}}
|-
| {{code|imgalt}} || {{tlc|message/box|&amp;larr; Alt text set to "{{samp|Olle}}"|imgalt{{=}}Olle}} || {{message/box|&larr; Alt text set to "{{samp|Olle}}"|imgalt=Olle}}
|-
| rowspan="2" | {{code|imglink}} || {{tlc|message/box|&amp;larr; Internal wikilink|imglink{{=}}L10n:Teams:sv-SE/en}} || {{message/box|&larr; Internal wikilink|imglink=L10n:Teams:sv-SE/en}}
|-
| {{tlc|message/box|&amp;larr; URL|imglink{{=}}{{nowiki|http://www.strindbergandhelium.com/}}}} || {{message/box|&larr; URL|imglink=http://www.strindbergandhelium.com/}}
|-
| colspan="3" |
|-
! colspan="3" | <h4>Text</h4>
|-
! Parameter !! What you write !! style="width:300px;" | What you see
|-
| {{code|1}} || {{tlc|message/box|{{nowiki|You ''can'' '''use''' <sup>wiki</sup> <big>markup</big>}}}} || {{message/box|You ''can'' '''use''' <sup>wiki</sup> <big>markup</big>}}
|-
| {{code|title}} || {{tlc|message/box|title{{=}}This is the message title|This is the message text}} || {{message/box|title=This is the message title|This is the message text}}
|-
| rowspan="3" | {{code|fgcolor}} || {{tlc|message/box|CSS colour name|fgcolor{{=}}magenta}} || {{message/box|CSS colour name|fgcolor=magenta}}
|-
| {{tlc|message/box|Hex colour code|fgcolor{{=}}#FF00FF}} || {{message/box|Hex colour code|fgcolor=#FF00FF}}
|-
| {{tlc|message/box|Mozilla colour value|fgcolor{{=}}mozred}} || {{message/box|Mozilla colour value|fgcolor=mozred}}
|-
| rowspan="2" | {{code|talign}} || {{tlc|message/box|Right-aligned text|talign{{=}}right}} || {{message/box|Right-aligned text|talign=right}}
|-
| {{tlc|message/box|Centered text|talign{{=}}center}} || {{message/box|Centered text|talign=center}}
|-
|-
! Example case !! What you write !! What you see (error)
| rowspan="2" | {{code|tdir}} || {{tlc|message/box|متن خود را|tdir{{=}}rtl}} || {{message/box|متن خود را|tdir=rtl}}
|-
|-
| No&nbsp;parameter || <code><nowiki>{{message/box}}</nowiki></code> || {{message/box}}
| {{tlc|message/box|متن خود را|tdir{{=}}rtl|float{{=}}right}} || {{message/box|متن خود را|tdir=rtl|float=right}}
|}
|}


==See also==
==See also==
* {{tl|message}} – the same as <code><nowiki>{{message/box}}</nowiki></code>, minus the option to define the width of the box and some other tweaks.
* {{tl|message}} – the same as {{tlc|message/box}}, minus the option to define the width of the box and some other tweaks.
* <nowiki>{{admon}}</nowiki> – four types of message boxes for various situations, based upon the template <code><nowiki>{{message}}</nowiki></code>.
* {{tl|admon}} – four types of message boxes for various situations, based upon the template {{tlf|message}}.
** {{tl|admon/caution}}
** {{tl|admon/important}}
** {{tl|admon/note}}
** {{tl|admon/tip}}
* {{tl|label}} – strong message box for incredibly important messages. Use only if absolutely necessary.
* {{tl|label}} – strong message box for incredibly important messages. Use only if absolutely necessary.


3,860

edits