Difference between revisions of "Template:Gridcell"

From BlogNomic Wiki
Jump to navigation Jump to search
(trying a thing for fixed size grid cells)
 
Line 34: Line 34:
 
| {{gridcell|#000}}      | {{box|Void}}
 
| {{gridcell|#000}}      | {{box|Void}}
 
|}
 
|}
 +
 +
==Related templates==
 +
* [[Template:Bgcolor]], the same template without the minimum height and width
 +
 
[[Category:Display templates]]</noinclude>
 
[[Category:Display templates]]</noinclude>

Revision as of 09:01, 16 August 2024

style="min-width:4em; height:4em; background-color:{{{1}}};"

Usage

This template generates CSS for table cell backgrounds, for use in wiki markup tables, so that each cell appears a minimum of 4em high and wide.

It takes one or two colour inputs, which can be hex including the hash (eg. #69B3E7) or a web colour term (eg. aquamarine).

If only one colour is specified, the box background is that colour. If two are specified, the background shades a gradient from one to the other, top left to bottom right.

Example:

{| class="wikitable" style="text-align:center"
! !! A !! B !! C
|-
! 1
| {{gridcell}}            | 
| {{gridcell|white|grey}} | {{chip|$|gold}}
| {{gridcell|yellow}}     | 
|-
! 2
| {{gridcell|#aaffaa}}    | {{box|Refuel Point}}
| {{gridcell}}            |
| {{gridcell|#000}}       | {{box|Void}}
|}

produces:

A B
1
$
2
Refuel Point
Void

Related templates