Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Color box/doc: Difference between revisions

Template page
m Rewrite documentation.
m Rewrite doc.
Line 3: Line 3:


; Syntax
; Syntax
: {{T|Color box|3=border= color|4=width= percentage|5=color= color|6=align= position|7=text= color|8=content}}
: {{T|Color box|3=content|4=border= color|5=width= percentage|6=color= color|7=align= position|8=text= color}}
: All parameters are optional.
:; Parameters
:: '''border''' - Sets the border color of the box. The default is set to a shade of {{Co|#888888|gray}}. Colors can be given either by color name<ref>https://www.w3schools.com/cssref/css_colors.asp [2021-10-23]</ref> (e.g. {{Co|red|red}} or {{Co|green|green}}) or values<ref>https://www.w3schools.com/cssref/css_colors_legal.asp [2021-10-23]</ref> (like {{Co|#0000FF|#FF0000}}).
:: All named parameters are optional.
:: '''width''' - Sets the width of the box.  It's recommended to set this as a percentage (of the paragraph width), so <code>50%</code> will produce a text box half as wide as the surrounding paragraph. If omitted, the text box will be as wide as the surrounding paragraph. When width is set to less than <code>100%</code>, the box will be centered.
::; content : The contents of the box.  This can be as long or short as necessary, and wiki formatting (such as bold text or links) works just fine. '''Note:''' If the text you would like to use include an equals sign (=), you need to explicitly declare your text as a numbered parameter (i.e. put 1= before your text), otherwise the template will display nothing.
:: '''color''' - Sets the background color of the box. The default is set to black. For valid values see border
::; border : Sets the border color of the box. The default is set to a shade of {{Co|#888888|gray}}. Colors can be given either by color name<ref>https://www.w3schools.com/cssref/css_colors.asp [2021-10-23]</ref> (e.g. {{Co|red|red}} or {{Co|green|green}}) or values<ref>https://www.w3schools.com/cssref/css_colors_legal.asp [2021-10-23]</ref> (like {{Co|#0000FF|#FF0000}}).
:: '''align''' - Sets the position of the text within the box. The default is set to left. Values are: left, center, right or justify.
::; width : Sets the width of the box.  It's recommended to set this as a percentage (of the paragraph width), so <code>50%</code> will produce a text box half as wide as the surrounding paragraph. If omitted, the text box will be as wide as the surrounding paragraph. When width is set to less than <code>100%</code>, the box will be centered.
:: '''text''' - Sets the text color of the box. The default is set to {{Co|white|white}}. For valid values see border.
::; color : Sets the background color of the box. The default is set to black. For valid values see border
:: '''content''' - The contents of the box.  This can be as long or short as necessary, and wiki formatting (such as bold text or links) works just fine. '''Note:''' If the text you would like to use include an equals sign (=), you need to explicitly declare your text as a numbered parameter (i.e. put 1= before your text), otherwise the template will display nothing.  
::; align : Sets the position of the text within the box. The default is set to left. Values are: left, center, right or justify.
::; text : Sets the text color of the box. The default is set to {{Co|white|white}}. For valid values see border.


; Usage notes
; Usage notes