Template:Parameter/testcases

in these, the pipe and the assigned value (if any) use @media screen{html.skin-theme-clientpref-night .mw-parser-output div:not(.notheme)>.tmp-color,html.skin-t…

Template:Parameter/testcases

Syntax highlighting

in these, the pipe and the assigned value (if any) use #333; the assignment operator uses #666 – these colors same as <syntaxhighlight>...</syntaxhighlight> as of 2024-08-07

Test 1
{{Parameter|foo|bar}}

{{Parameter}}

|foo=bar

{{Parameter/sandbox}}

|foo=bar

– 'foo' uses #767600 (default; same as <syntaxhighlight>...</syntaxhighlight> as of 2024-08-07)

Test 2
{{Parameter|foo|bar|color=}}

{{Parameter}}

|foo=bar

{{Parameter/sandbox}}

|foo=bar

– 'foo' uses no color
Test 3
{{Parameter|foo|bar|color=inherit}}

{{Parameter}}

|foo=bar

{{Parameter/sandbox}}

|foo=bar

– nothing in the output is colored

Test 4
{{Parameter|foo|bar|color=inherit |plain=yes}}

{{Parameter}}

|foo=bar

{{Parameter/sandbox}}

|foo=bar

– nothing in the output is colored and no border

Test 5
{{Parameter|foo|bar|color=red}}

{{Parameter}}

|foo=bar

{{Parameter/sandbox}}

|foo=bar

– 'foo' uses #8B0000; same color used by {{!mxt}}

Test 6
{{Parameter|foo|bar|color=green}}

{{Parameter}}

|foo=bar

{{Parameter/sandbox}}

|foo=bar

– 'foo' uses #008000; a slightly brighter green than the color used by {{mxt}} (#006400)

Test 7
{{Parameter|foo|bar|color=blue}}

{{Parameter}}

|foo=bar

{{Parameter/sandbox}}

|foo=bar

– 'foo' uses whatever color is specified in |color= (except red and green); for red, use |color=#f00; for green use |color=#0f0

Test 8
{{Parameter|foo|bar|color=#f00}}

{{Parameter}}

|foo=bar

{{Parameter/sandbox}}

|foo=bar

Test 9
{{Parameter|foo|bar|color=#0f0}}

{{Parameter}}

|foo=bar

{{Parameter/sandbox}}

|foo=bar

These tests should be removed in the future when we get rid of |red=, |green=, |mxt=, and |!mxt=:

Test 10
{{Parameter|foo|bar|red=y}}

{{Parameter}}

|foo=bar

{{Parameter/sandbox}}

|foo=bar

Test 11
{{Parameter|foo|bar|green=y}}

{{Parameter}}

|foo=bar

{{Parameter/sandbox}}

|foo=bar

Test 12
{{Parameter|foo|bar|mxt=y}}

{{Parameter}}

|foo=bar

{{Parameter/sandbox}}

|foo=bar

Test 13
{{Parameter|foo|bar|!mxt=y}}

{{Parameter}}

|foo=bar

{{Parameter/sandbox}}

|foo=bar

Other formatting

Code Live Sandbox Notes
{{parameter|name}} |name= |name=
{{parameter|title|The Oxford English Dictionary}} |title=The Oxford English Dictionary |title=The Oxford English Dictionary
{{parameter||section}} |section |section For unnamed parameters;
note empty first
parameter in
the code
{{parameter|{{var|parameter}}|{{var|value}}}} |parameter=value |parameter=value
{{parameter|name|plain=yes}} |name= |name=
{{parameter|name|plain=yes|color=inherit}} |name= |name=

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.

  1. 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:
  2. 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.
  3. 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.
  4. 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.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.