Difference between revisions of "Template:Gridcell"

From BlogNomic Wiki
Jump to navigation Jump to search
 
Line 22: Line 22:
  
 
{| class="wikitable" style="text-align:center"
 
{| class="wikitable" style="text-align:center"
! !! A !! B
+
! !! A !! B !! C
 
|-
 
|-
 
! 1
 
! 1

Latest 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 C
1
$
2
Refuel Point
Void

Related templates