Difference between revisions of "Template:Color template doc/sandbox"
Jump to navigation
Jump to search
imported>Andrybak (test without Template:pad) |
imported>Andrybak m (sync with live template (issue I was trying to solve was _not_ in Template:Color template doc)) |
||
| Line 3: | Line 3: | ||
| {{#if:{{{1|}}}|{{tlc|{{BASEPAGENAME}}|{{{1}}}}} {{#if:{{{2|}}}|''or'' <code>…<nowiki>|</nowiki>{{{2}}}<nowiki>}}</nowiki></code>|}} {{#if:{{{3|}}}|''or'' <code>…<nowiki>|</nowiki>{{{3}}}<nowiki>}}</nowiki></code>|}} {{#if:{{{4|}}}|''or'' <code>…<nowiki>|</nowiki>{{{4}}}<nowiki>}}</nowiki></code>|}} {{#if:{{{5|}}}|''or'' <code>…<nowiki>|</nowiki>{{{5}}}<nowiki>}}</nowiki></code>|}}|{{tlc|{{BASEPAGENAME}}}}}} | | {{#if:{{{1|}}}|{{tlc|{{BASEPAGENAME}}|{{{1}}}}} {{#if:{{{2|}}}|''or'' <code>…<nowiki>|</nowiki>{{{2}}}<nowiki>}}</nowiki></code>|}} {{#if:{{{3|}}}|''or'' <code>…<nowiki>|</nowiki>{{{3}}}<nowiki>}}</nowiki></code>|}} {{#if:{{{4|}}}|''or'' <code>…<nowiki>|</nowiki>{{{4}}}<nowiki>}}</nowiki></code>|}} {{#if:{{{5|}}}|''or'' <code>…<nowiki>|</nowiki>{{{5}}}<nowiki>}}</nowiki></code>|}}|{{tlc|{{BASEPAGENAME}}}}}} | ||
| Sample: | | Sample: | ||
| − | | style="background:#{{ | + | | style="background:#{{{{BASEPAGENAME}}|{{{1}}}}}; border-top:solid 1px gray; " | {{pad|2em}} |
| − | </includeonly><noinclude> | + | | <code>{{lc:{{{{BASEPAGENAME}}|{{{1}}}}}}}</code></includeonly><noinclude> |
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 18:38, 17 February 2020
| This is the template sandbox page for Template:Color template doc (diff). |
This template lists as a wikitable row a template name and up to five arguments, a color sample and its hex value.
Usage
The template itself is contained between table start and end markup:
{| class="wikitable"
{{Color template doc|argument_1|argument_2|…|argument_5}}
|}
argument_1 can be omitted if the color template has only one value, or it is desired to show the default color; argument_2 through argument_5 are optional. All five are valid inputs for the color template.
Examples
When used on the page Template:TTC color/doc, the code {{Color template doc|}} produces
{{TTC color}}
|
Sample: | style="background:#Template:TTC color; border-top:solid 1px gray; " | | template:ttc color
|
while the code {{Color template doc|#default}} produces
{{TTC color|#default}}
|
Sample: | style="background:#Template:TTC color; border-top:solid 1px gray; " | | template:ttc color
|
Additional information can be added to the table. On the page Template:NYCS color/doc the code
{{Color template doc|blue}}
| [[IND Eighth Avenue Line|Eighth Avenue]]
| A / C / E / Eighth
produces
{{NYCS color|blue}}
|
Sample: | 0039a6
|
Eighth Avenue | A / C / E / Eighth |
See also
| The above documentation is transcluded from Template:Color template doc/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |