Template:Cell: Difference between revisions
Jump to navigation
Jump to search
>Yandere-sliver No edit summary |
>Yandere-sliver No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>|colspan="{{{colspan|1}}}" rowspan="{{{rowspan|1}}}" style="vertical-align: middle; text-align: center; background: {{ #switch: {{lc:{{{1}}}}}|no|cross|enemy|inactive=<nowiki>#f99</nowiki>|yes|tick|ally|active=<nowiki>#9f9</nowiki>|#default=inherit }};"|'''{{{2|{{ #switch: {{lc:{{{1}}}}} | <includeonly>|colspan="{{{colspan|1}}}" rowspan="{{{rowspan|1}}}" style="vertical-align: middle; text-align: center; background: {{ #switch: {{lc:{{{1}}}}}|no|red|cross|enemy|inactive=<nowiki>#f99</nowiki>|yes|green|tick|ally|active=<nowiki>#9f9</nowiki>|#default={{{color|inherit}}} }};"|'''{{{2|{{ #switch: {{lc:{{{1}}}}}|cross={{symbol|Cross}}|tick={{symbol|Tick}}|#default={{{1|{{symbol|Question}}}}} }}'''}}}</includeonly><noinclude>This template is used to create styled cells within wikitables. | ||
The template replaces the cell, like this: | The template replaces the cell, like this: | ||
Line 6: | Line 6: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
{{Cell| | {{Cell|tick}} | ||
| Maybe? | | Maybe? | ||
{{Cell|unknown|Maybe!}} | {{Cell|unknown|Maybe!}} | ||
Line 15: | Line 15: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
{{Cell| | {{Cell|tick}} | ||
| Maybe? | | Maybe? | ||
{{Cell|unknown|Maybe!}} | {{Cell|unknown|Maybe!}} | ||
Line 38: | Line 38: | ||
{{Cell|tick}} | {{Cell|tick}} | ||
|- | |- | ||
| | | ''default'' | ||
{{Cell | {{Cell}} | ||
|} | |} | ||
Line 48: | Line 48: | ||
* <code>{{{colspan}}}</code>: adjusts across how many columns the cell spans. Defaults to 1. | * <code>{{{colspan}}}</code>: adjusts across how many columns the cell spans. Defaults to 1. | ||
* <code>{{{rowspan}}}</code>: adjusts across how many rows the cell spans. Defaults to 1. | * <code>{{{rowspan}}}</code>: adjusts across how many rows the cell spans. Defaults to 1. | ||
* <code>{{{color}}}</code>: if the inherent color option should be overwritten. | |||
[[Category:Templates]] | [[Category:Templates]] |
Latest revision as of 15:55, 26 April 2019
This template is used to create styled cells within wikitables.
The template replaces the cell, like this:
{| class="wikitable" |- {{Cell|tick}} | Maybe? {{Cell|unknown|Maybe!}} {{Cell|no|Never!}} |}
Maybe? | Maybe! | Never! |
It only works with MediaWiki's table syntax, not with HTML <table>
elements.
Cell styles
The first parameter specifies the cell styles. It must be one of the following:
cell style | default display |
---|---|
cross | |
tick | |
default |
Optional parameters
The second parameter can be used to override the text.
{{{colspan}}}
: adjusts across how many columns the cell spans. Defaults to 1.{{{rowspan}}}
: adjusts across how many rows the cell spans. Defaults to 1.{{{color}}}
: if the inherent color option should be overwritten.