Template:Colored cell: Difference between revisions

From TSP Encyclopedia
Jump to navigation Jump to search
m (Fix rowspan)
Tag: 2017 source edit
m (Fix rowspan for real)
Tag: 2017 source edit
Line 1: Line 1:
<onlyinclude><includeonly>{{#if: {{{hover|}}}|title="{{{hover|}}}" |}}{{#if:{{{rowspan|}}}|rowspan={{{rowspan|}}} |}}{{{#if:{{{colspan|}}}|colspan={{{colspan|}}} |}}style="background: #{{{1|{{{color|{{{colour|}}}}}}}}}; width: {{{width|5px}}};" |
<onlyinclude><includeonly>{{#if: {{{hover|}}}|title="{{{hover|}}}"|}} {{#if:{{{rowspan|}}}|rowspan={{{rowspan|}}}|}} {{#if:{{{colspan|}}}|colspan={{{colspan|}}}|}} style="background: #{{{1|{{{color|{{{colour|}}}}}}}}}; width: {{{width|5px}}};" |
</includeonly></onlyinclude>
</includeonly></onlyinclude>
<noinclude>
<noinclude>

Revision as of 18:57, 12 February 2024


Formats a newly begun table cell to have the given background color. Optionally, adds a hover-over tooltip, rowspan or colspan value, or cell width.

[Edit template data]

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
11 color colour

Hex code of the color the cell should have.

Default
000000
Example
FF9900
Stringrequired
hoverhover

Tooltip text to display when hovering over the cell.

Stringoptional
widthwidth

Width the cell should have.

Default
5px
Example
10px
Stringoptional
rowspanrowspan

Custom rowspan value.

Numberoptional
colspancolspan

Custom colspan value.

Numberoptional