value
| This template is used onapproximately 146,000 pages. To avoid major disruption and server load, any changes should be tested in the template's/sandbox or/testcases subpages, or in your ownuser subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on thetalk page before implementing them. |
Provides a lightly bordered box to highlight param values onTemplate documentation pages. Especially useful in cases where values may have leading or trailing blanks, or multiple embedded blanks.
{{param value|value}}
There is one required positional parameter for the value, and four optional params: three for styling the display, and one replacement parameter for dealing with how to render a blank space:
|1= – the value to be highlighted; required (no default)|border= – may be used to set border attributes. default:thin solid #caa. Alias:|b=.|bg-color= – may be used to set background-color. default:white. Alias:|bg=.|style= – may be used to set anyCSS style attributes, with one or more semicolon-separatedattribute:value pairs. default:none.|space= – may be used to make spaces visible. Alias:|sp=. See#Making spaces visible below.Note on special characters: if the value to be highlighted contains an equal sign, it must be escaped: use{{=}} instead of a bare equal sign character.
{{param value|2blanks between}} yields:2blanks between{{param value|2blanks between|space=·}} yields:2blanks··between{{param value| * : # }} yields: * : # {{param value| * : # |border=2px dashed khaki}} yields: * : # {{param value|white|bg=yellow}} yields:white{{pvalue|thin solid #caa|bg=#f5fcf9}} yields:thin solid #caa{{pval|* #|border=thin dashed purple|bg=#ffe6e6|style=border-radius:5px|space=␠}} yields:*␠␠#You may makespace characters visible by replacing them with any character you choose using param|space=. Here are some characters that have been historically used for this purpose. In these examples, there are two spaces betweenone andtwo:
{{param value|one two|space=␠}} ⟶one␠␠two{{pvalue|one two|space=␢}} ⟶one␢␢two{{pvalue|one two|space=<small>␢</small>}} ⟶one␢␢two{{pval|one two|space=·}} ⟶one··two{{pval|one two|space=⎵}} ⟶one⎵⎵two{{pval|one two|space=▯}} ⟶one▯▯two{{pval|one two|space=‿}} ⟶one‿‿two