{{{3}}}

Description

A miniature {{Userbox}}, with only a caption cell.

Usage

The template's parameters are listed below. It is not necessary to name the first three parameters if they are assigned values in order, so template calls may use the shorthand form {{Userbox|color1|color2|caption}}.

{{Userbox
|color1=
|color2=
|caption=
|border=
|style=
|style1=
|headerbackground=
}}

Required parameters

  1. |color1 The color of the cell's background and the box border.
  2. |color2 The color of the box's background. By default the cell fills the whole box, so this field may be left blank.
  3. |caption The content of the cell. This is often an image, which will stretch the cell if not constrained to fit within a 45px × 45px space.

Optional parameters

  1. |border= The box border color, which defaults to color1.
  2. |style= Any additional CSS values to set for the entire box. Do not include quotation marks.
  3. |style1= Any additional CSS for the cell.
  4. |headerbackground= Determines whether the cell's background is automatically darkened when viewed on a web browser in dark mode. The default value is 1, which applies dark-mode behavior to the box background only. Setting |headerbackground=0 will disable dark-mode behavior, whereas |headerbackground=2 will apply it to the cell.

Examples

Description Code Result
Implicit parameters
{{Userbox-m|#CCC|#EEE|blah}}
blah
Explicit parameters
{{Userbox-m
|color1=#CCC
|color2=#EEE
|caption=blah
}}
blah
Different border color
{{Userbox-m|#CCC|#EEE|blah|border=#F00}}
blah
Extra table styling
{{Userbox-m|#CCC|#EEE|blah|style=border:1px dashed #00F}}
blah
Extra cell styling
{{Userbox-m|#CCC|#EEE|blah|style1=color:#F00}}
blah
Fully preserved in dark mode
{{Userbox-m|#CCC|#EEE|blah|style1=color:#F00|headerbackground=0}}
blah
Fully reactive to dark mode
{{Userbox-m|#CCC|#EEE|blah|style1=color:#F00|headerbackground=2}}
blah

See also