Difference between revisions of "Grid"
From Gulf of Fallen Stars
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
=== Parameters === | === Parameters === | ||
− | '''type(required):''' begin / div / end | + | '''type(required):''' begin / div / end ("nl" can be used instead of div, if you want a newline in the grid) |
'''cols(default 3):''' number of columns on widest screen | '''cols(default 3):''' number of columns on widest screen | ||
Line 37: | Line 37: | ||
-->{{#if:{{{nomargin|}}}|{{#vardefine:margin|margin:0px;}}{{#vardefine:padding|padding:0px;}}|}}<!-- | -->{{#if:{{{nomargin|}}}|{{#vardefine:margin|margin:0px;}}{{#vardefine:padding|padding:0px;}}|}}<!-- | ||
− | -->{{# | + | -->{{#vardefine:startdivs|<div style="display:inline-table;width:{{#var:width}};min-width:{{#var:minwidth}};"><div style="{{#var:boxstyle}}{{#var:margin}}{{#var:padding}}{{#var:background}}{{#var:textstyle|}}">}}<!-- |
− | -->{{# | + | -->{{#vardefine:enddivs|</div></div>}}<!-- |
− | -->{{#ifeq:{{{type}}}|end| | + | |
+ | -->{{#ifeq:{{{type}}}|begin|{{#var:startdivs}}}}<!-- | ||
+ | -->{{#ifeq:{{{type}}}|div|{{#var:enddivs}}{{#var:startdivs}}|}}<!-- | ||
+ | -->{{#ifeq:{{{type}}}|nl|{{#var:enddivs}}<wbr>{{#var:startdivs}}|}}<!-- | ||
+ | -->{{#ifeq:{{{type}}}|end|{{#var:enddivs}}}} |
Revision as of 20:03, 10 March 2020
Parameters
type(required): begin / div / end ("nl" can be used instead of div, if you want a newline in the grid)
cols(default 3): number of columns on widest screen
ignoreminwidth(default false): columns will have no minimum width
border(default false): whether the box should have a border
background(default transparent): the background of the grid cell. Defaults to white if border is true.
center(default false): center the text in the div
nomargin(default false): Overrides all margins and padding to 0