Template:Cells: Difference between revisions
Jump to navigation
Jump to search
Created page with '{{#if:{{{1|}}} |{{#ifexpr: {{{1}}}>0| {{#invoke:String|rep|{{cell|{{{2}}}|style={{{style|}}}}}|{{{1}}} }} }} |<code><nowiki>{{cells|</nowiki>''n''<nowiki>|</nowiki>''COLOUR''<now…' |
No edit summary |
||
Line 1: | Line 1: | ||
{| class="wikitable" style="width: 100%;" | |||
|- | |||
|style="background-color:{{#if:{{{1|}}}|{{#replace:{{{1}}}|#|#}}|#ffffff}}; colspan={{#if:{{{2|}}}|{{{2}}}|1}}"|{{#if:{{{3|}}}|{{{3}}}| }} | |||
|}<!--Earlier version | |||
{{#if:{{{1|}}} | {{#if:{{{1|}}} | ||
|{{#ifexpr: {{{1}}}>0| {{#invoke:String|rep|{{cell|{{{2}}}|style={{{style|}}}}}|{{{1}}} }} }} | |{{#ifexpr: {{{1}}}>0| {{#invoke:String|rep|{{cell|{{{2}}}|style={{{style|}}}}}|{{{1}}} }} }} | ||
|<code><nowiki>{{cells|</nowiki>''n''<nowiki>|</nowiki>''COLOUR''<nowiki>}}</nowiki></code> | |<code><nowiki>{{cells|</nowiki>''n''<nowiki>|</nowiki>''COLOUR''<nowiki>}}</nowiki></code> | ||
}}<noinclude> | }} | ||
--><noinclude> | |||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> |
Revision as of 15:23, 10 March 2024
[edit] [{{#invoke:Purge|main}}] Template documentation
The {{cells}} template can be used to create up to 20 consecutive table cells with a specified background colour.
The command {{cells|4|COLOUR}}
is equivalent to
Usage
The template takes two unnamed parameters as input
- n is the number of consecutive table cells
- COLOUR is the background colour
Examples
- Code
{{scarf|width=30em|{{cell|red}}{{cells|4|blue}}{{cell|green}}}}
- Result
|
Note
The {{cell2}} and {{cell3}} templates can be used for a sequence of two or three cells of the same colour.
See also
- {{cell}}
- {{cell2}}
- {{cell3}}
- {{colour box}}
- {{colour strip}}
- {{scarf}}
The above documentation is transcluded from Template:Cells/doc. (edit | history) Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |