Template:Param value
.mw-parser-output .tpl-pval__code{border:thin solid var(--border-color-base,#a2a9b1);background-color:var(--color-inverted,#fff);color:inherit;white-space:nowra…
value
| This template uses TemplateStyles: |
Provides a lightly bordered box to highlight param values on Template documentation pages. Especially useful in cases where values may have leading or trailing blanks, or multiple embedded blanks.
Usage
{{param value|value}}
Parameters
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 any CSS style attributes, with one or more semicolon-separatedattribute:valuepairs. 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.
Examples
{{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:*␠␠#
Making spaces visible
You may make space 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 between one and two:
- Space symbol – (U+2420 = ␠ ) :
{{param value|one two|space=␠}}⟶one␠␠two - Blank symbol – (U+2422 = ␢ ) :
{{pvalue|one two|space=␢}}⟶one␢␢two- Blank symbol – (smaller: ␢) :
{{pvalue|one two|space=<small>␢</small>}}⟶one␢␢two
- Blank symbol – (smaller: ␢) :
- Middot – (U+00B7 = · ) :
{{pval|one two|space=·}}⟶one··two - Underbracket – (U+23B5 = ⎵ ) :
{{pval|one two|space=⎵}}⟶one⎵⎵two - White rectangle – (U+25AF = ▯ ) :
{{pval|one two|space=▯}}⟶one▯▯two - Undertie – (U+203F = ‿ ) :
{{pval|one two|space=‿}}⟶one‿‿two
See also
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.