Jump to content

Template:Param value/doc

From Wikipedia

This template dey provide small bordered box wey fit highlight parameter values for Template documentation pages. E dey useful especially when the values fit get spaces for front or back, or plenty spaces inside.

{{param value|value}}

Parameters

[edit source]

This template get one required positional parameter for the value, plus four optional parameters: three for changing how the display go look, and one replacement parameter for showing blank spaces:

|1= – the value wey you want make the template highlight; this one be required (no default)
|border= – you fit use am set border properties. Default: <code class="tpl-pval__code" style=" color: black; Expression error: Unrecognized punctuation character "[". ">thin solid #caa. Alias: |b=.
|bg-color= – you fit use am set background colour. Default: <code class="tpl-pval__code" style=" color: black; Expression error: Unrecognized punctuation character "[". ">white. Alias: |bg=.
|style= – you fit use am set any CSS style properties, with one or more semicolon-separated Template:Pval pairs. Default: none.
|space= – you fit use am make spaces show. Alias: |sp=. See #Making spaces visible below.

Note about special characters: If the value wey you want highlight get equal sign inside, you for escape am. Use {{=}} instead of normal equal sign character.

Examples

[edit source]
  • {{param value|2blanks between}} dey give: <code class="tpl-pval__code" style=" Expression error: Unrecognized punctuation character "[". ">2blanks  between
  • {{param value|2blanks between|space=·}} dey give: <code class="tpl-pval__code" style=" Expression error: Unrecognized punctuation character "[". ">2blanks··between
  • {{param value| * : # }} dey give: <code class="tpl-pval__code" style=" Expression error: Unrecognized punctuation character "[". ">  * : # 
  • {{param value| * : # |border=2px dashed khaki}} dey give: <code class="tpl-pval__code" style="border:2px dashed khaki; Expression error: Unrecognized punctuation character "[". ">  * : # 
  • {{param value|white|bg=yellow}} dey give: <code class="tpl-pval__code" style=" color: black; Expression error: Unrecognized punctuation character "[". ">white
  • {{pvalue|thin solid #caa|bg=#f5fcf9}} dey give: Template:Pvalue
  • {{pval|* #|border=thin dashed purple|bg=#ffe6e6|style=border-radius:5px|space=␠}} dey give: Template:Pval

How to make spaces show

[edit source]

You fit make space characters show by replacing them with any character wey you choose using the |space= parameter. These be some characters wey people don use for this purpose before. For these examples, there be two spaces between one and two:

  • Space symbol – (U+2420 = ␠): {{param value|one two|space=␠}} ⟶ <code class="tpl-pval__code" style=" Expression error: Unrecognized punctuation character "[". ">one␠␠two
    • Blank symbol – smaller: ␢ : {{pvalue|one two|space=<small>␢</small>}} ⟶ <code class="tpl-pval__code" style=" Expression error: Unrecognized punctuation character "[". ">one␢␢two

See also

[edit source]
  • {{mono}}, wey only give monospaced font
  • {{code}}, wey only give syntax highlighting without stopping line breaks
  • {{Codett}}, wrapper for this template wey removes background and border styling
  • {{PreCode}}, wey stops line breaks inside the code
  • {{Syntaxhighlight}}
  • {{kbd}}, for keyboard input

Template:Semantic markup templates