{"route":"/en-US-v0.14.1/reference/layout/grid/","title":"Grid","description":"Documentation for the `grid` function.","part":null,"outline":[{"id":"summary","name":"Summary","children":[]},{"id":"track-size","name":"Track Size","children":[]},{"id":"examples","name":"Examples","children":[]},{"id":"styling","name":"Styling","children":[{"id":"stroke-styling-precedence","name":"Stroke styling precedence","children":[]}]},{"id":"accessibility","name":"Accessibility","children":[]},{"id":"parameters","name":"Parameters","children":[{"id":"parameters-columns","name":"columns","children":[]},{"id":"parameters-rows","name":"rows","children":[]},{"id":"parameters-gutter","name":"gutter","children":[]},{"id":"parameters-column-gutter","name":"column-gutter","children":[]},{"id":"parameters-row-gutter","name":"row-gutter","children":[]},{"id":"parameters-inset","name":"inset","children":[]},{"id":"parameters-align","name":"align","children":[]},{"id":"parameters-fill","name":"fill","children":[]},{"id":"parameters-stroke","name":"stroke","children":[]},{"id":"parameters-children","name":"children","children":[]}]},{"id":"definitions","name":"Definitions","children":[{"id":"definitions-cell","name":"Grid Cell","children":[{"id":"definitions-cell-body","name":"body","children":[]},{"id":"definitions-cell-x","name":"x","children":[]},{"id":"definitions-cell-y","name":"y","children":[]},{"id":"definitions-cell-colspan","name":"colspan","children":[]},{"id":"definitions-cell-rowspan","name":"rowspan","children":[]},{"id":"definitions-cell-inset","name":"inset","children":[]},{"id":"definitions-cell-align","name":"align","children":[]},{"id":"definitions-cell-fill","name":"fill","children":[]},{"id":"definitions-cell-stroke","name":"stroke","children":[]},{"id":"definitions-cell-breakable","name":"breakable","children":[]}]},{"id":"definitions-hline","name":"Grid Horizontal Line","children":[{"id":"definitions-hline-y","name":"y","children":[]},{"id":"definitions-hline-start","name":"start","children":[]},{"id":"definitions-hline-end","name":"end","children":[]},{"id":"definitions-hline-stroke","name":"stroke","children":[]},{"id":"definitions-hline-position","name":"position","children":[]}]},{"id":"definitions-vline","name":"Grid Vertical Line","children":[{"id":"definitions-vline-x","name":"x","children":[]},{"id":"definitions-vline-start","name":"start","children":[]},{"id":"definitions-vline-end","name":"end","children":[]},{"id":"definitions-vline-stroke","name":"stroke","children":[]},{"id":"definitions-vline-position","name":"position","children":[]}]},{"id":"definitions-header","name":"Grid Header","children":[{"id":"definitions-header-repeat","name":"repeat","children":[]},{"id":"definitions-header-level","name":"level","children":[]},{"id":"definitions-header-children","name":"children","children":[]}]},{"id":"definitions-footer","name":"Grid Footer","children":[{"id":"definitions-footer-repeat","name":"repeat","children":[]},{"id":"definitions-footer-children","name":"children","children":[]}]}]}],"body":{"kind":"func","content":{"path":[],"name":"grid","title":"Grid","keywords":[],"oneliner":"Arranges content in a grid.","element":true,"contextual":false,"deprecationMessage":null,"deprecationUntil":null,"details":[{"kind":"html","content":"<p>Arranges content in a grid.</p>\n<p>The grid element allows you to arrange content in a grid. You can define the\nnumber of rows and columns, as well as the size of the gutters between them.\nThere are multiple sizing modes for columns and rows that can be used to\ncreate complex layouts.</p>\n<p>While the grid and table elements work very similarly, they are intended for\ndifferent use cases and carry different semantics. The grid element is\nintended for presentational and layout purposes, while the <a href=\"/en-US-v0.14.1/reference/model/table/\" title=\"`table`\"><code>table</code></a> element\nis intended for, in broad terms, presenting multiple related data points.\nSet and show rules on one of these elements do not affect the other. Refer\nto the <a href=\"/en-US-v0.14.1/reference/layout/grid/#accessibility\">Accessibility Section</a> to learn how grids and\ntables are presented to users of Assistive Technology (AT) like screen\nreaders.</p>\n<h2 id=\"track-size\">Sizing the tracks</h2>\n<p>A grid's sizing is determined by the track sizes specified in the arguments.\nThere are multiple sizing parameters: <a href=\"/en-US-v0.14.1/reference/layout/grid/#parameters-columns\"><code>columns</code></a>,\n<a href=\"/en-US-v0.14.1/reference/layout/grid/#parameters-rows\"><code>rows</code></a> and <a href=\"/en-US-v0.14.1/reference/layout/grid/#parameters-gutter\"><code>gutter</code></a>.\nBecause each of the sizing parameters accepts the same values, we will\nexplain them just once, here. Each sizing argument accepts an array of\nindividual track sizes. A track size is either:</p>\n<ul>\n<li>\n<p><code><span class=\"typ-key\">auto</span></code>: The track will be sized to fit its contents. It will be at most\nas large as the remaining space. If there is more than one <code><span class=\"typ-key\">auto</span></code> track\nwidth, and together they claim more than the available space, the <code><span class=\"typ-key\">auto</span></code>\ntracks will fairly distribute the available space among themselves.</p>\n</li>\n<li>\n<p>A fixed or relative length (e.g. <code><span class=\"typ-num\">10pt</span></code> or <code><span class=\"typ-num\">20%</span> <span class=\"typ-op\">-</span> <span class=\"typ-num\">1cm</span></code>): The track\nwill be exactly of this size.</p>\n</li>\n<li>\n<p>A fractional length (e.g. <code><span class=\"typ-num\">1fr</span></code>): Once all other tracks have been sized,\nthe remaining space will be divided among the fractional tracks according\nto their fractions. For example, if there are two fractional tracks, each\nwith a fraction of <code><span class=\"typ-num\">1fr</span></code>, they will each take up half of the remaining\nspace.</p>\n</li>\n</ul>\n<p>To specify a single track, the array can be omitted in favor of a single\nvalue. To specify multiple <code><span class=\"typ-key\">auto</span></code> tracks, enter the number of tracks\ninstead of an array. For example, <code>columns:</code> <code><span class=\"typ-num\">3</span></code> is equivalent to\n<code>columns:</code> <code><span class=\"typ-punct\">(</span><span class=\"typ-key\">auto</span><span class=\"typ-punct\">,</span> <span class=\"typ-key\">auto</span><span class=\"typ-punct\">,</span> <span class=\"typ-key\">auto</span><span class=\"typ-punct\">)</span></code>.</p>\n<h2 id=\"examples\">Examples</h2>\n<p>The example below demonstrates the different track sizing options. It also\nshows how you can use <a href=\"/en-US-v0.14.1/reference/layout/grid/#definitions-cell\" title=\"`grid.cell`\"><code>grid.cell</code></a> to make an individual cell span two grid\ntracks.</p>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-comment\">// We use `rect` to emphasize the</span>\n<span class=\"typ-comment\">// area of cells.</span>\n<span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> <span class=\"typ-func\">rect</span><span class=\"typ-punct\">(</span>\n  inset<span class=\"typ-punct\">:</span> <span class=\"typ-num\">8pt</span><span class=\"typ-punct\">,</span>\n  fill<span class=\"typ-punct\">:</span> <span class=\"typ-func\">rgb</span><span class=\"typ-punct\">(</span><span class=\"typ-str\">&quot;e4e5ea&quot;</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  width<span class=\"typ-punct\">:</span> <span class=\"typ-num\">100%</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n\n<span class=\"typ-func\">#</span><span class=\"typ-func\">grid</span><span class=\"typ-punct\">(</span>\n  columns<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">(</span><span class=\"typ-num\">60pt</span><span class=\"typ-punct\">,</span> <span class=\"typ-num\">1fr</span><span class=\"typ-punct\">,</span> <span class=\"typ-num\">2fr</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  rows<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">(</span><span class=\"typ-key\">auto</span><span class=\"typ-punct\">,</span> <span class=\"typ-num\">60pt</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  gutter<span class=\"typ-punct\">:</span> <span class=\"typ-num\">3pt</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-func\">rect</span><span class=\"typ-punct\">[</span>Fixed width, auto height<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-func\">rect</span><span class=\"typ-punct\">[</span>1/3 of the remains<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-func\">rect</span><span class=\"typ-punct\">[</span>2/3 of the remains<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-func\">rect</span><span class=\"typ-punct\">(</span>height<span class=\"typ-punct\">:</span> <span class=\"typ-num\">100%</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>Fixed height<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  grid<span class=\"typ-punct\">.</span><span class=\"typ-func\">cell</span><span class=\"typ-punct\">(</span>\n    colspan<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2</span><span class=\"typ-punct\">,</span>\n    <span class=\"typ-func\">image</span><span class=\"typ-punct\">(</span><span class=\"typ-str\">&quot;tiger.jpg&quot;</span><span class=\"typ-punct\">,</span> width<span class=\"typ-punct\">:</span> <span class=\"typ-num\">100%</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/9d4e8714750ff00270cb0fc4f0bc09ae.png\" alt=\"Preview\"></div></div>\n<p>You can also <a href=\"/en-US-v0.14.1/reference/foundations/arguments/#spreading\">spread</a> an array of strings or content\ninto a grid to populate its cells.</p>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-func\">#</span><span class=\"typ-func\">grid</span><span class=\"typ-punct\">(</span>\n  columns<span class=\"typ-punct\">:</span> <span class=\"typ-num\">5</span><span class=\"typ-punct\">,</span>\n  gutter<span class=\"typ-punct\">:</span> <span class=\"typ-num\">5pt</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-op\">..</span><span class=\"typ-func\">range</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">25</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">.</span><span class=\"typ-func\">map</span><span class=\"typ-punct\">(</span>str<span class=\"typ-punct\">)</span>\n<span class=\"typ-punct\">)</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/aad11723d596b2524d0d3d305af58082.png\" alt=\"Preview\"></div></div>\n<h2 id=\"styling\">Styling the grid</h2>\n<p>The grid and table elements work similarly. For a hands-on explanation,\nrefer to the <a href=\"/en-US-v0.14.1/guides/tables/#fills\">Table Guide</a>; for a quick overview,\ncontinue reading.</p>\n<p>The grid's appearance can be customized through different parameters. These\nare the most important ones:</p>\n<ul>\n<li><a href=\"/en-US-v0.14.1/reference/layout/grid/#parameters-align\"><code>align</code></a> to change how cells are aligned</li>\n<li><a href=\"/en-US-v0.14.1/reference/layout/grid/#parameters-inset\"><code>inset</code></a> to optionally add internal padding to cells</li>\n<li><a href=\"/en-US-v0.14.1/reference/layout/grid/#parameters-fill\"><code>fill</code></a> to give cells a background</li>\n<li><a href=\"/en-US-v0.14.1/reference/layout/grid/#parameters-stroke\"><code>stroke</code></a> to optionally enable grid lines with a certain\nstroke</li>\n</ul>\n<p>To meet different needs, there are various ways to set them.</p>\n<p>If you need to override the above options for individual cells, you can use\nthe <a href=\"/en-US-v0.14.1/reference/layout/grid/#definitions-cell\" title=\"`grid.cell`\"><code>grid.cell</code></a> element. Likewise, you can override individual grid lines\nwith the <a href=\"/en-US-v0.14.1/reference/layout/grid/#definitions-hline\" title=\"`grid.hline`\"><code>grid.hline</code></a> and <a href=\"/en-US-v0.14.1/reference/layout/grid/#definitions-vline\" title=\"`grid.vline`\"><code>grid.vline</code></a> elements.</p>\n<p>To configure an overall style for a grid, you may instead specify the option\nin any of the following fashions:</p>\n<ul>\n<li>As a single value that applies to all cells.</li>\n<li>As an array of values corresponding to each column. The array will be\ncycled if there are more columns than the array has items.</li>\n<li>As a function in the form of <code>(x, y) =&gt; value</code>. It receives the cell's\ncolumn and row indices (both starting from zero) and should return the\nvalue to apply to that cell.</li>\n</ul>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-func\">#</span><span class=\"typ-func\">grid</span><span class=\"typ-punct\">(</span>\n  columns<span class=\"typ-punct\">:</span> <span class=\"typ-num\">5</span><span class=\"typ-punct\">,</span>\n\n  <span class=\"typ-comment\">// By a single value</span>\n  align<span class=\"typ-punct\">:</span> center<span class=\"typ-punct\">,</span>\n  <span class=\"typ-comment\">// By a single but more complicated value</span>\n  inset<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">(</span>x<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2pt</span><span class=\"typ-punct\">,</span> y<span class=\"typ-punct\">:</span> <span class=\"typ-num\">3pt</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-comment\">// By an array of values (cycling)</span>\n  fill<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">(</span><span class=\"typ-func\">rgb</span><span class=\"typ-punct\">(</span><span class=\"typ-str\">&quot;#239dad50&quot;</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span> <span class=\"typ-key\">none</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-comment\">// By a function that returns a value</span>\n  stroke<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">(</span>x<span class=\"typ-punct\">,</span> y<span class=\"typ-punct\">)</span> <span class=\"typ-op\">=&gt;</span> <span class=\"typ-key\">if</span> calc<span class=\"typ-punct\">.</span><span class=\"typ-func\">rem</span><span class=\"typ-punct\">(</span>x <span class=\"typ-op\">+</span> y<span class=\"typ-punct\">,</span> <span class=\"typ-num\">3</span><span class=\"typ-punct\">)</span> <span class=\"typ-op\">==</span> <span class=\"typ-num\">0</span> <span class=\"typ-punct\">{</span> <span class=\"typ-num\">0.5pt</span> <span class=\"typ-punct\">}</span><span class=\"typ-punct\">,</span>\n\n  <span class=\"typ-op\">..</span><span class=\"typ-func\">range</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">5</span> <span class=\"typ-op\">*</span> <span class=\"typ-num\">3</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">.</span><span class=\"typ-func\">map</span><span class=\"typ-punct\">(</span>n <span class=\"typ-op\">=&gt;</span> <span class=\"typ-func\">numbering</span><span class=\"typ-punct\">(</span><span class=\"typ-str\">&quot;A&quot;</span><span class=\"typ-punct\">,</span> n <span class=\"typ-op\">+</span> <span class=\"typ-num\">1</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">)</span>\n<span class=\"typ-punct\">)</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/5ba008cb625404be10f2b8abc3412fab.png\" alt=\"Preview\"></div></div>\n<p>On top of that, you may <a href=\"/en-US-v0.14.1/reference/styling/\">apply styling rules</a> to <a href=\"/en-US-v0.14.1/reference/layout/grid/\" title=\"`grid`\"><code>grid</code></a> and\n<a href=\"/en-US-v0.14.1/reference/layout/grid/#definitions-cell\" title=\"`grid.cell`\"><code>grid.cell</code></a>. Especially, the <a href=\"/en-US-v0.14.1/reference/layout/grid/#definitions-cell-x\"><code>x</code></a> and <a href=\"/en-US-v0.14.1/reference/layout/grid/#definitions-cell-y\"><code>y</code></a>\nfields of <code>grid.cell</code> can be used in a <a href=\"/en-US-v0.14.1/reference/foundations/function/#definitions-where\"><code>where</code></a> selector,\nmaking it possible to style cells at specific columns or rows, or individual\npositions.</p>\n<h3 id=\"stroke-styling-precedence\">Stroke styling precedence</h3>\n<p>As explained above, there are three ways to set the stroke of a grid cell:\nthrough <a href=\"/en-US-v0.14.1/reference/layout/grid/#definitions-cell-stroke\"><code>grid<span class=\"typ-punct\">.</span>cell</code>'s <code>stroke</code> field</a>, by using\n<a href=\"/en-US-v0.14.1/reference/layout/grid/#definitions-hline\"><code>grid<span class=\"typ-punct\">.</span>hline</code></a> and <a href=\"/en-US-v0.14.1/reference/layout/grid/#definitions-vline\"><code>grid<span class=\"typ-punct\">.</span>vline</code></a>, or by\nsetting the <a href=\"/en-US-v0.14.1/reference/layout/grid/#parameters-stroke\"><code>grid</code>'s <code>stroke</code> field</a>. When multiple of\nthese settings are present and conflict, the <code>hline</code> and <code>vline</code> settings\ntake the highest precedence, followed by the <code>cell</code> settings, and finally\nthe <code>grid</code> settings.</p>\n<p>Furthermore, strokes of a repeated grid header or footer will take\nprecedence over regular cell strokes.</p>\n<h2 id=\"accessibility\">Accessibility</h2>\n<p>Grids do not carry any special semantics. Assistive Technology (AT) does not\noffer the ability to navigate two-dimensionally by cell in grids. If you\nwant to present tabular data, use the <a href=\"/en-US-v0.14.1/reference/model/table/\" title=\"`table`\"><code>table</code></a> element instead.</p>\n<p>AT will read the grid cells in their semantic order. Usually, this is the\norder in which you passed them to the grid. However, if you manually\npositioned them using <a href=\"/en-US-v0.14.1/reference/layout/grid/#definitions-cell-x\"><code>grid.cell</code>'s <code>x</code> and <code>y</code> arguments</a>,\ncells will be read row by row, from left to right (in left-to-right\ndocuments). A cell will be read when its position is first reached.</p>"}],"self":false,"params":[{"name":"columns","details":[{"kind":"html","content":"<p>The column sizes.</p>\n<p>Either specify a track size array or provide an integer to create a grid\nwith that many <code><span class=\"typ-key\">auto</span></code>-sized columns. Note that opposed to rows and\ngutters, providing a single track size will only ever create a single\ncolumn.</p>\n<p>See the <a href=\"#track-size\">track size section</a> above for more details.</p>"}],"types":["auto","int","relative","fraction","array"],"strings":[],"default":"<code><span class=\"typ-punct\">(</span><span class=\"typ-punct\">)</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"rows","details":[{"kind":"html","content":"<p>The row sizes.</p>\n<p>If there are more cells than fit the defined rows, the last row is\nrepeated until there are no more cells.</p>\n<p>See the <a href=\"#track-size\">track size section</a> above for more details.</p>"}],"types":["auto","int","relative","fraction","array"],"strings":[],"default":"<code><span class=\"typ-punct\">(</span><span class=\"typ-punct\">)</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"gutter","details":[{"kind":"html","content":"<p>The gaps between rows and columns. This is a shorthand to set\n<a href=\"/en-US-v0.14.1/reference/layout/grid/#parameters-column-gutter\"><code>column-gutter</code></a> and <a href=\"/en-US-v0.14.1/reference/layout/grid/#parameters-row-gutter\"><code>row-gutter</code></a>\nto the same value.</p>\n<p>If there are more gutters than defined sizes, the last gutter is\nrepeated.</p>\n<p>See the <a href=\"#track-size\">track size section</a> above for more details.</p>"}],"types":["auto","int","relative","fraction","array"],"strings":[],"default":"<code><span class=\"typ-punct\">(</span><span class=\"typ-punct\">)</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":false},{"name":"column-gutter","details":[{"kind":"html","content":"<p>The gaps between columns.</p>"}],"types":["auto","int","relative","fraction","array"],"strings":[],"default":"<code><span class=\"typ-punct\">(</span><span class=\"typ-punct\">)</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"row-gutter","details":[{"kind":"html","content":"<p>The gaps between rows.</p>"}],"types":["auto","int","relative","fraction","array"],"strings":[],"default":"<code><span class=\"typ-punct\">(</span><span class=\"typ-punct\">)</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"inset","details":[{"kind":"html","content":"<p>How much to pad the cells' content.</p>\n<p>To specify a uniform inset for all cells, you can use a single length\nfor all sides, or a dictionary of lengths for individual sides. See the\n<a href=\"/en-US-v0.14.1/reference/layout/box/#parameters-inset\">box's documentation</a> for more details.</p>\n<p>To specify varying inset for different cells, you can:</p>\n<ul>\n<li>use a single inset for all cells</li>\n<li>use an array of insets corresponding to each column</li>\n<li>use a function that maps a cell's position to its inset</li>\n</ul>\n<p>See the <a href=\"#styling\">styling section</a> above for more details.</p>\n<p>In addition, you can find an example at the <a href=\"/en-US-v0.14.1/reference/model/table/#parameters-inset\" title=\"`table.inset`\"><code>table.inset</code></a> parameter.</p>"}],"types":["relative","array","dictionary","function"],"strings":[],"default":"<code><span class=\"typ-punct\">(</span><span class=\"typ-punct\">:</span><span class=\"typ-punct\">)</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"align","details":[{"kind":"html","content":"<p>How to align the cells' content.</p>\n<p>If set to <code><span class=\"typ-key\">auto</span></code>, the outer alignment is used.</p>\n<p>You can specify the alignment in any of the following fashions:</p>\n<ul>\n<li>use a single alignment for all cells</li>\n<li>use an array of alignments corresponding to each column</li>\n<li>use a function that maps a cell's position to its alignment</li>\n</ul>\n<p>See the <a href=\"#styling\">styling section</a> above for details.</p>\n<p>In addition, you can find an example at the <a href=\"/en-US-v0.14.1/reference/model/table/#parameters-align\" title=\"`table.align`\"><code>table.align</code></a> parameter.</p>"}],"types":["auto","array","alignment","function"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"fill","details":[{"kind":"html","content":"<p>How to fill the cells.</p>\n<p>This can be:</p>\n<ul>\n<li>a single color for all cells</li>\n<li>an array of colors corresponding to each column</li>\n<li>a function that maps a cell's position to its color</li>\n</ul>\n<p>Most notably, arrays and functions are useful for creating striped grids.\nSee the <a href=\"#styling\">styling section</a> above for more details.</p>"},{"kind":"example","content":{"body":"<div class=\"previewed-code\"><pre><code><span class=\"typ-func\">#</span><span class=\"typ-func\">grid</span><span class=\"typ-punct\">(</span>\n  fill<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">(</span>x<span class=\"typ-punct\">,</span> y<span class=\"typ-punct\">)</span> <span class=\"typ-op\">=&gt;</span>\n    <span class=\"typ-key\">if</span> calc<span class=\"typ-punct\">.</span><span class=\"typ-func\">even</span><span class=\"typ-punct\">(</span>x <span class=\"typ-op\">+</span> y<span class=\"typ-punct\">)</span> <span class=\"typ-punct\">{</span> <span class=\"typ-func\">luma</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">230</span><span class=\"typ-punct\">)</span> <span class=\"typ-punct\">}</span>\n    <span class=\"typ-key\">else</span> <span class=\"typ-punct\">{</span> white <span class=\"typ-punct\">}</span><span class=\"typ-punct\">,</span>\n  align<span class=\"typ-punct\">:</span> center <span class=\"typ-op\">+</span> horizon<span class=\"typ-punct\">,</span>\n  columns<span class=\"typ-punct\">:</span> <span class=\"typ-num\">4</span><span class=\"typ-punct\">,</span>\n  inset<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2pt</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">[</span>X<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>O<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>X<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>O<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">[</span>O<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>X<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>O<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>X<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">[</span>X<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>O<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>X<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>O<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">[</span>O<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>X<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>O<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>X<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/616a52b479521e50994e6526049b3d5d.png\" alt=\"Preview\"></div></div>","title":null}}],"types":["none","color","gradient","array","tiling","function"],"strings":[],"default":"<code><span class=\"typ-key\">none</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"stroke","details":[{"kind":"html","content":"<p>How to <a href=\"/en-US-v0.14.1/reference/visualize/stroke/\">stroke</a> the cells.</p>\n<p>Grids have no strokes by default, which can be changed by setting this\noption to the desired stroke.</p>\n<p>If it is necessary to place lines which can cross spacing between cells\nproduced by the <a href=\"/en-US-v0.14.1/reference/layout/grid/#parameters-gutter\"><code>gutter</code></a> option, or to override the\nstroke between multiple specific cells, consider specifying one or more\nof <a href=\"/en-US-v0.14.1/reference/layout/grid/#definitions-hline\" title=\"`grid.hline`\"><code>grid.hline</code></a> and <a href=\"/en-US-v0.14.1/reference/layout/grid/#definitions-vline\" title=\"`grid.vline`\"><code>grid.vline</code></a> alongside your grid cells.</p>\n<p>To specify the same stroke for all cells, you can use a single <a href=\"/en-US-v0.14.1/reference/visualize/stroke/\" title=\"stroke\">stroke</a>\nfor all sides, or a dictionary of <a href=\"/en-US-v0.14.1/reference/visualize/stroke/\">strokes</a> for individual\nsides. See the <a href=\"/en-US-v0.14.1/reference/visualize/rect/#parameters-stroke\">rectangle's documentation</a> for more\ndetails.</p>\n<p>To specify varying strokes for different cells, you can:</p>\n<ul>\n<li>use a single stroke for all cells</li>\n<li>use an array of strokes corresponding to each column</li>\n<li>use a function that maps a cell's position to its stroke</li>\n</ul>\n<p>See the <a href=\"#styling\">styling section</a> above for more details.</p>"},{"kind":"example","content":{"body":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> <span class=\"typ-func\">page</span><span class=\"typ-punct\">(</span>width<span class=\"typ-punct\">:</span> <span class=\"typ-num\">420pt</span><span class=\"typ-punct\">)</span>\n<span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> <span class=\"typ-func\">text</span><span class=\"typ-punct\">(</span>number-type<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;old-style&quot;</span><span class=\"typ-punct\">)</span>\n<span class=\"typ-key\">#</span><span class=\"typ-key\">show</span> grid<span class=\"typ-punct\">.</span>cell<span class=\"typ-punct\">.</span><span class=\"typ-func\">where</span><span class=\"typ-punct\">(</span>y<span class=\"typ-punct\">:</span> <span class=\"typ-num\">0</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">:</span> <span class=\"typ-key\">set</span> <span class=\"typ-func\">text</span><span class=\"typ-punct\">(</span>size<span class=\"typ-punct\">:</span> <span class=\"typ-num\">1.3em</span><span class=\"typ-punct\">)</span>\n\n<span class=\"typ-func\">#</span><span class=\"typ-func\">grid</span><span class=\"typ-punct\">(</span>\n  columns<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">(</span><span class=\"typ-num\">1fr</span><span class=\"typ-punct\">,</span> <span class=\"typ-num\">2fr</span><span class=\"typ-punct\">,</span> <span class=\"typ-num\">2fr</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  row-gutter<span class=\"typ-punct\">:</span> <span class=\"typ-num\">1.5em</span><span class=\"typ-punct\">,</span>\n  inset<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">(</span>left<span class=\"typ-punct\">:</span> <span class=\"typ-num\">0.5em</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  stroke<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">(</span>x<span class=\"typ-punct\">,</span> y<span class=\"typ-punct\">)</span> <span class=\"typ-op\">=&gt;</span> <span class=\"typ-key\">if</span> x <span class=\"typ-op\">&gt;</span> <span class=\"typ-num\">0</span> <span class=\"typ-punct\">{</span> <span class=\"typ-punct\">(</span>left<span class=\"typ-punct\">:</span> <span class=\"typ-num\">0.5pt</span> <span class=\"typ-op\">+</span> gray<span class=\"typ-punct\">)</span> <span class=\"typ-punct\">}</span><span class=\"typ-punct\">,</span>\n  align<span class=\"typ-punct\">:</span> horizon<span class=\"typ-punct\">,</span>\n\n  <span class=\"typ-punct\">[</span>Winter <span class=\"typ-escape\">\\</span> 2007 <span class=\"typ-escape\">\\</span> Season<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">[</span>Aaron Copland <span class=\"typ-escape\">\\</span> <span class=\"typ-strong\">*The Tender Land*</span> <span class=\"typ-escape\">\\</span> January 2007<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">[</span>Eric Satie <span class=\"typ-escape\">\\</span> <span class=\"typ-strong\">*Gymnopedie 1, 2*</span> <span class=\"typ-escape\">\\</span> February 2007<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n\n  <span class=\"typ-punct\">[</span><span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">[</span>Jan 12 <span class=\"typ-escape\">\\</span> <span class=\"typ-strong\">*Middlebury College <span class=\"typ-escape\">\\</span> Center for the Arts*</span> <span class=\"typ-escape\">\\</span> 20:00<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">[</span>Feb 2 <span class=\"typ-escape\">\\</span> <span class=\"typ-strong\">*Johnson State College Dibden Center for the Arts*</span> <span class=\"typ-escape\">\\</span> 19:30<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n\n  <span class=\"typ-punct\">[</span><span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">[</span>Skip a week <span class=\"typ-escape\">\\</span> <span class=\"typ-func\">#</span><span class=\"typ-func\">text</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">0.8em</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span><span class=\"typ-emph\">_Prepare your exams!_</span><span class=\"typ-punct\">]</span><span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">[</span>Feb 9 <span class=\"typ-escape\">\\</span> <span class=\"typ-strong\">*Castleton State College <span class=\"typ-escape\">\\</span> Fine Arts Center*</span> <span class=\"typ-escape\">\\</span> 19:30<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n\n  <span class=\"typ-punct\">[</span><span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">[</span>Jan 26, 27 <span class=\"typ-escape\">\\</span> <span class=\"typ-strong\">*Lyndon State College Alexander Twilight Theater*</span> <span class=\"typ-escape\">\\</span> 20:00<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">[</span>\n    Feb 17 <span class=\"typ-escape\">---</span> <span class=\"typ-func\">#</span><span class=\"typ-func\">smallcaps</span><span class=\"typ-punct\">[</span>Anniversary<span class=\"typ-punct\">]</span> <span class=\"typ-escape\">\\</span>\n    <span class=\"typ-strong\">*Middlebury College <span class=\"typ-escape\">\\</span> Center for the Arts*</span> <span class=\"typ-escape\">\\</span>\n    19:00 <span class=\"typ-func\">#</span><span class=\"typ-func\">text</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">0.7em</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>(for a special guest)<span class=\"typ-punct\">]</span>\n  <span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/93123d099493092251a0af3841def084.png\" alt=\"Preview\"></div></div>","title":"Passing a function to set a stroke based on position"}},{"kind":"example","content":{"body":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> <span class=\"typ-func\">page</span><span class=\"typ-punct\">(</span>height<span class=\"typ-punct\">:</span> <span class=\"typ-num\">13em</span><span class=\"typ-punct\">,</span> width<span class=\"typ-punct\">:</span> <span class=\"typ-num\">26em</span><span class=\"typ-punct\">)</span>\n\n<span class=\"typ-key\">#</span><span class=\"typ-key\">let</span> <span class=\"typ-func\">cv</span><span class=\"typ-punct\">(</span><span class=\"typ-op\">..</span>jobs<span class=\"typ-punct\">)</span> <span class=\"typ-op\">=</span> <span class=\"typ-func\">grid</span><span class=\"typ-punct\">(</span>\n  columns<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2</span><span class=\"typ-punct\">,</span>\n  inset<span class=\"typ-punct\">:</span> <span class=\"typ-num\">5pt</span><span class=\"typ-punct\">,</span>\n  stroke<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">(</span>x<span class=\"typ-punct\">,</span> y<span class=\"typ-punct\">)</span> <span class=\"typ-op\">=&gt;</span> <span class=\"typ-key\">if</span> x <span class=\"typ-op\">==</span> <span class=\"typ-num\">0</span> <span class=\"typ-key\">and</span> y <span class=\"typ-op\">&gt;</span> <span class=\"typ-num\">0</span> <span class=\"typ-punct\">{</span>\n    <span class=\"typ-punct\">(</span>right<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">(</span>\n      paint<span class=\"typ-punct\">:</span> <span class=\"typ-func\">luma</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">180</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n      thickness<span class=\"typ-punct\">:</span> <span class=\"typ-num\">1.5pt</span><span class=\"typ-punct\">,</span>\n      dash<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;dotted&quot;</span><span class=\"typ-punct\">,</span>\n    <span class=\"typ-punct\">)</span><span class=\"typ-punct\">)</span>\n  <span class=\"typ-punct\">}</span><span class=\"typ-punct\">,</span>\n  grid<span class=\"typ-punct\">.</span><span class=\"typ-func\">header</span><span class=\"typ-punct\">(</span>grid<span class=\"typ-punct\">.</span><span class=\"typ-func\">cell</span><span class=\"typ-punct\">(</span>colspan<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>\n    <span class=\"typ-strong\">*Professional Experience*</span>\n    <span class=\"typ-func\">#</span><span class=\"typ-func\">box</span><span class=\"typ-punct\">(</span>width<span class=\"typ-punct\">:</span> <span class=\"typ-num\">1fr</span><span class=\"typ-punct\">,</span> <span class=\"typ-func\">line</span><span class=\"typ-punct\">(</span>length<span class=\"typ-punct\">:</span> <span class=\"typ-num\">100%</span><span class=\"typ-punct\">,</span> stroke<span class=\"typ-punct\">:</span> <span class=\"typ-func\">luma</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">180</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">)</span>\n  <span class=\"typ-punct\">]</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-op\">..</span><span class=\"typ-punct\">{</span>\n    <span class=\"typ-key\">let</span> last <span class=\"typ-op\">=</span> <span class=\"typ-key\">none</span>\n    <span class=\"typ-key\">for</span> job <span class=\"typ-key\">in</span> jobs<span class=\"typ-punct\">.</span><span class=\"typ-func\">pos</span><span class=\"typ-punct\">(</span><span class=\"typ-punct\">)</span> <span class=\"typ-punct\">{</span>\n      <span class=\"typ-punct\">(</span>\n        <span class=\"typ-key\">if</span> job<span class=\"typ-punct\">.</span>year <span class=\"typ-op\">!=</span> last <span class=\"typ-punct\">[</span><span class=\"typ-strong\">*<span class=\"typ-pol\">#</span><span class=\"typ-pol\">job</span><span class=\"typ-punct\">.</span><span class=\"typ-pol\">year</span>*</span><span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n        <span class=\"typ-punct\">[</span>\n          <span class=\"typ-strong\">*<span class=\"typ-pol\">#</span><span class=\"typ-pol\">job</span><span class=\"typ-punct\">.</span><span class=\"typ-pol\">company</span>*</span> - <span class=\"typ-pol\">#</span><span class=\"typ-pol\">job</span><span class=\"typ-punct\">.</span><span class=\"typ-pol\">role</span> <span class=\"typ-emph\">_(<span class=\"typ-pol\">#</span><span class=\"typ-pol\">job</span><span class=\"typ-punct\">.</span><span class=\"typ-pol\">timeframe</span>)_</span> <span class=\"typ-escape\">\\</span>\n          <span class=\"typ-pol\">#</span><span class=\"typ-pol\">job</span><span class=\"typ-punct\">.</span><span class=\"typ-pol\">details</span>\n        <span class=\"typ-punct\">]</span>\n      <span class=\"typ-punct\">)</span>\n      last <span class=\"typ-op\">=</span> job<span class=\"typ-punct\">.</span>year\n    <span class=\"typ-punct\">}</span>\n  <span class=\"typ-punct\">}</span>\n<span class=\"typ-punct\">)</span>\n\n<span class=\"typ-func\">#</span><span class=\"typ-func\">cv</span><span class=\"typ-punct\">(</span>\n  <span class=\"typ-punct\">(</span>\n    year<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2012</span><span class=\"typ-punct\">,</span>\n    company<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>Pear Seed &amp; Co.<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n    role<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>Lead Engineer<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n    timeframe<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>Jul - Dec<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n    details<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>\n      <span class=\"typ-marker\">-</span> Raised engineers from 3x to 10x\n      <span class=\"typ-marker\">-</span> Did a great job\n    <span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">(</span>\n    year<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2012</span><span class=\"typ-punct\">,</span>\n    company<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>Mega Corp.<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n    role<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>VP of Sales<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n    timeframe<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>Mar - Jun<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n    details<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span><span class=\"typ-marker\">-</span> Closed tons of customers<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">(</span>\n    year<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2013</span><span class=\"typ-punct\">,</span>\n    company<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>Tiny Co.<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n    role<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>CEO<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n    timeframe<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>Jan - Dec<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n    details<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span><span class=\"typ-marker\">-</span> Delivered 4x more shareholder value<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">(</span>\n    year<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2014</span><span class=\"typ-punct\">,</span>\n    company<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>Glorbocorp Ltd<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n    role<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>CTO<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n    timeframe<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>Jan - Mar<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n    details<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span><span class=\"typ-marker\">-</span> Drove containerization forward<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/f94d003f6832c75b4ed1d250cc259abf-0.png\" alt=\"Preview page 1\"><img src=\"/en-US-v0.14.1/assets/f94d003f6832c75b4ed1d250cc259abf-1.png\" alt=\"Preview page 2\"></div></div>","title":"Folding the stroke dictionary"}}],"types":["none","length","color","gradient","array","stroke","tiling","dictionary","function"],"strings":[],"default":"<code><span class=\"typ-punct\">(</span><span class=\"typ-punct\">:</span><span class=\"typ-punct\">)</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"children","details":[{"kind":"html","content":"<p>The contents of the grid cells, plus any extra grid lines specified with\nthe <a href=\"/en-US-v0.14.1/reference/layout/grid/#definitions-hline\" title=\"`grid.hline`\"><code>grid.hline</code></a> and <a href=\"/en-US-v0.14.1/reference/layout/grid/#definitions-vline\" title=\"`grid.vline`\"><code>grid.vline</code></a> elements.</p>\n<p>The cells are populated in row-major order.</p>"}],"types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":true,"settable":false}],"returns":["content"],"scope":[{"path":["grid"],"name":"cell","title":"Grid Cell","keywords":[],"oneliner":"A cell in the grid.","element":true,"contextual":false,"deprecationMessage":null,"deprecationUntil":null,"details":[{"kind":"html","content":"<p>A cell in the grid. You can use this function in the argument list of a grid\nto override grid style properties for an individual cell or manually\npositioning it within the grid. You can also use this function in show rules\nto apply certain styles to multiple cells at once.</p>\n<p>For example, you can override the position and stroke for a single cell:</p>"},{"kind":"example","content":{"body":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">set</span> <span class=\"typ-func\">text</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">15pt</span><span class=\"typ-punct\">,</span> font<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;Noto Sans Symbols 2&quot;</span><span class=\"typ-punct\">)</span>\n<span class=\"typ-key\">#</span><span class=\"typ-key\">show</span> <span class=\"typ-func\">regex</span><span class=\"typ-punct\">(</span><span class=\"typ-str\">&quot;[♚-♟︎]&quot;</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">:</span> <span class=\"typ-key\">set</span> <span class=\"typ-func\">text</span><span class=\"typ-punct\">(</span>fill<span class=\"typ-punct\">:</span> <span class=\"typ-func\">rgb</span><span class=\"typ-punct\">(</span><span class=\"typ-str\">&quot;21212A&quot;</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">)</span>\n<span class=\"typ-key\">#</span><span class=\"typ-key\">show</span> <span class=\"typ-func\">regex</span><span class=\"typ-punct\">(</span><span class=\"typ-str\">&quot;[♔-♙]&quot;</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">:</span> <span class=\"typ-key\">set</span> <span class=\"typ-func\">text</span><span class=\"typ-punct\">(</span>fill<span class=\"typ-punct\">:</span> <span class=\"typ-func\">rgb</span><span class=\"typ-punct\">(</span><span class=\"typ-str\">&quot;111015&quot;</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">)</span>\n\n<span class=\"typ-func\">#</span><span class=\"typ-func\">grid</span><span class=\"typ-punct\">(</span>\n  fill<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">(</span>x<span class=\"typ-punct\">,</span> y<span class=\"typ-punct\">)</span> <span class=\"typ-op\">=&gt;</span> <span class=\"typ-func\">rgb</span><span class=\"typ-punct\">(</span>\n    <span class=\"typ-key\">if</span> calc<span class=\"typ-punct\">.</span><span class=\"typ-func\">odd</span><span class=\"typ-punct\">(</span>x <span class=\"typ-op\">+</span> y<span class=\"typ-punct\">)</span> <span class=\"typ-punct\">{</span> <span class=\"typ-str\">&quot;7F8396&quot;</span> <span class=\"typ-punct\">}</span>\n    <span class=\"typ-key\">else</span> <span class=\"typ-punct\">{</span> <span class=\"typ-str\">&quot;EFF0F3&quot;</span> <span class=\"typ-punct\">}</span>\n  <span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  columns<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">(</span><span class=\"typ-num\">1em</span><span class=\"typ-punct\">,</span><span class=\"typ-punct\">)</span> <span class=\"typ-op\">*</span> <span class=\"typ-num\">8</span><span class=\"typ-punct\">,</span>\n  rows<span class=\"typ-punct\">:</span> <span class=\"typ-num\">1em</span><span class=\"typ-punct\">,</span>\n  align<span class=\"typ-punct\">:</span> center <span class=\"typ-op\">+</span> horizon<span class=\"typ-punct\">,</span>\n\n  <span class=\"typ-punct\">[</span>♖<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>♘<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>♗<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>♕<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>♔<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>♗<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>♘<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>♖<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">[</span>♙<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>♙<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>♙<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>♙<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span><span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>  <span class=\"typ-punct\">[</span>♙<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>♙<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>♙<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n  grid<span class=\"typ-punct\">.</span><span class=\"typ-func\">cell</span><span class=\"typ-punct\">(</span>\n    x<span class=\"typ-punct\">:</span> <span class=\"typ-num\">4</span><span class=\"typ-punct\">,</span> y<span class=\"typ-punct\">:</span> <span class=\"typ-num\">3</span><span class=\"typ-punct\">,</span>\n    stroke<span class=\"typ-punct\">:</span> blue<span class=\"typ-punct\">.</span><span class=\"typ-func\">transparentize</span><span class=\"typ-punct\">(</span><span class=\"typ-num\">60%</span><span class=\"typ-punct\">)</span>\n  <span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>♙<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n\n  <span class=\"typ-op\">..</span><span class=\"typ-punct\">(</span>grid<span class=\"typ-punct\">.</span><span class=\"typ-func\">cell</span><span class=\"typ-punct\">(</span>y<span class=\"typ-punct\">:</span> <span class=\"typ-num\">6</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>♟<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span><span class=\"typ-punct\">)</span> <span class=\"typ-op\">*</span> <span class=\"typ-num\">8</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-op\">..</span><span class=\"typ-punct\">(</span><span class=\"typ-punct\">[</span>♜<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>♞<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>♝<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>♛<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>♚<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>♝<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>♞<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>♜<span class=\"typ-punct\">]</span><span class=\"typ-punct\">)</span>\n    <span class=\"typ-punct\">.</span><span class=\"typ-func\">map</span><span class=\"typ-punct\">(</span>grid<span class=\"typ-punct\">.</span>cell<span class=\"typ-punct\">.</span><span class=\"typ-func\">with</span><span class=\"typ-punct\">(</span>y<span class=\"typ-punct\">:</span> <span class=\"typ-num\">7</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/85a80ca20c73818a35cfef42a986e689.png\" alt=\"Preview\"></div></div>","title":null}},{"kind":"html","content":"<p>You may also apply a show rule on <code>grid.cell</code> to style all cells at once,\nwhich allows you, for example, to apply styles based on a cell's position.\nRefer to the examples of the <a href=\"/en-US-v0.14.1/reference/model/table/#definitions-cell\" title=\"`table.cell`\"><code>table.cell</code></a> element to learn more about\nthis.</p>"}],"self":false,"params":[{"name":"body","details":[{"kind":"html","content":"<p>The cell's body.</p>"}],"types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":false,"settable":false},{"name":"x","details":[{"kind":"html","content":"<p>The cell's column (zero-indexed).\nThis field may be used in show rules to style a cell depending on its\ncolumn.</p>\n<p>You may override this field to pick in which column the cell must\nbe placed. If no row (<code>y</code>) is chosen, the cell will be placed in the\nfirst row (starting at row 0) with that column available (or a new row\nif none). If both <code>x</code> and <code>y</code> are chosen, however, the cell will be\nplaced in that exact position. An error is raised if that position is\nnot available (thus, it is usually wise to specify cells with a custom\nposition before cells with automatic positions).</p>"},{"kind":"example","content":{"body":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">let</span> <span class=\"typ-func\">circ</span><span class=\"typ-punct\">(</span>c<span class=\"typ-punct\">)</span> <span class=\"typ-op\">=</span> <span class=\"typ-func\">circle</span><span class=\"typ-punct\">(</span>\n    fill<span class=\"typ-punct\">:</span> c<span class=\"typ-punct\">,</span> width<span class=\"typ-punct\">:</span> <span class=\"typ-num\">5mm</span>\n<span class=\"typ-punct\">)</span>\n\n<span class=\"typ-func\">#</span><span class=\"typ-func\">grid</span><span class=\"typ-punct\">(</span>\n  columns<span class=\"typ-punct\">:</span> <span class=\"typ-num\">4</span><span class=\"typ-punct\">,</span>\n  rows<span class=\"typ-punct\">:</span> <span class=\"typ-num\">7mm</span><span class=\"typ-punct\">,</span>\n  stroke<span class=\"typ-punct\">:</span> <span class=\"typ-num\">.5pt</span> <span class=\"typ-op\">+</span> blue<span class=\"typ-punct\">,</span>\n  align<span class=\"typ-punct\">:</span> center <span class=\"typ-op\">+</span> horizon<span class=\"typ-punct\">,</span>\n  inset<span class=\"typ-punct\">:</span> <span class=\"typ-num\">1mm</span><span class=\"typ-punct\">,</span>\n\n  grid<span class=\"typ-punct\">.</span><span class=\"typ-func\">cell</span><span class=\"typ-punct\">(</span>x<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2</span><span class=\"typ-punct\">,</span> y<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2</span><span class=\"typ-punct\">,</span> <span class=\"typ-func\">circ</span><span class=\"typ-punct\">(</span>aqua<span class=\"typ-punct\">)</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-func\">circ</span><span class=\"typ-punct\">(</span>yellow<span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  grid<span class=\"typ-punct\">.</span><span class=\"typ-func\">cell</span><span class=\"typ-punct\">(</span>x<span class=\"typ-punct\">:</span> <span class=\"typ-num\">3</span><span class=\"typ-punct\">,</span> <span class=\"typ-func\">circ</span><span class=\"typ-punct\">(</span>green<span class=\"typ-punct\">)</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-func\">circ</span><span class=\"typ-punct\">(</span>black<span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/d4295624ceed58586c2323592650f5a3.png\" alt=\"Preview\"></div></div>","title":null}}],"types":["auto","int"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"y","details":[{"kind":"html","content":"<p>The cell's row (zero-indexed).\nThis field may be used in show rules to style a cell depending on its\nrow.</p>\n<p>You may override this field to pick in which row the cell must be\nplaced. If no column (<code>x</code>) is chosen, the cell will be placed in the\nfirst column (starting at column 0) available in the chosen row. If all\ncolumns in the chosen row are already occupied, an error is raised.</p>"},{"kind":"example","content":{"body":"<div class=\"previewed-code\"><pre><code><span class=\"typ-key\">#</span><span class=\"typ-key\">let</span> <span class=\"typ-func\">tri</span><span class=\"typ-punct\">(</span>c<span class=\"typ-punct\">)</span> <span class=\"typ-op\">=</span> polygon<span class=\"typ-punct\">.</span><span class=\"typ-func\">regular</span><span class=\"typ-punct\">(</span>\n  fill<span class=\"typ-punct\">:</span> c<span class=\"typ-punct\">,</span>\n  size<span class=\"typ-punct\">:</span> <span class=\"typ-num\">5mm</span><span class=\"typ-punct\">,</span>\n  vertices<span class=\"typ-punct\">:</span> <span class=\"typ-num\">3</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n\n<span class=\"typ-func\">#</span><span class=\"typ-func\">grid</span><span class=\"typ-punct\">(</span>\n  columns<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2</span><span class=\"typ-punct\">,</span>\n  stroke<span class=\"typ-punct\">:</span> blue<span class=\"typ-punct\">,</span>\n  inset<span class=\"typ-punct\">:</span> <span class=\"typ-num\">1mm</span><span class=\"typ-punct\">,</span>\n\n  <span class=\"typ-func\">tri</span><span class=\"typ-punct\">(</span>black<span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  grid<span class=\"typ-punct\">.</span><span class=\"typ-func\">cell</span><span class=\"typ-punct\">(</span>y<span class=\"typ-punct\">:</span> <span class=\"typ-num\">1</span><span class=\"typ-punct\">,</span> <span class=\"typ-func\">tri</span><span class=\"typ-punct\">(</span>teal<span class=\"typ-punct\">)</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  grid<span class=\"typ-punct\">.</span><span class=\"typ-func\">cell</span><span class=\"typ-punct\">(</span>y<span class=\"typ-punct\">:</span> <span class=\"typ-num\">1</span><span class=\"typ-punct\">,</span> <span class=\"typ-func\">tri</span><span class=\"typ-punct\">(</span>red<span class=\"typ-punct\">)</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  grid<span class=\"typ-punct\">.</span><span class=\"typ-func\">cell</span><span class=\"typ-punct\">(</span>y<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2</span><span class=\"typ-punct\">,</span> <span class=\"typ-func\">tri</span><span class=\"typ-punct\">(</span>orange<span class=\"typ-punct\">)</span><span class=\"typ-punct\">)</span>\n<span class=\"typ-punct\">)</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/2aa1128c7723558f82b243152265c648.png\" alt=\"Preview\"></div></div>","title":null}}],"types":["auto","int"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"colspan","details":[{"kind":"html","content":"<p>The amount of columns spanned by this cell.</p>"}],"types":["int"],"strings":[],"default":"<code><span class=\"typ-num\">1</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"rowspan","details":[{"kind":"html","content":"<p>The amount of rows spanned by this cell.</p>"}],"types":["int"],"strings":[],"default":"<code><span class=\"typ-num\">1</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"inset","details":[{"kind":"html","content":"<p>The cell's <a href=\"/en-US-v0.14.1/reference/layout/grid/#parameters-inset\">inset</a> override.</p>"}],"types":["auto","relative","dictionary"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"align","details":[{"kind":"html","content":"<p>The cell's <a href=\"/en-US-v0.14.1/reference/layout/grid/#parameters-align\">alignment</a> override.</p>"}],"types":["auto","alignment"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"fill","details":[{"kind":"html","content":"<p>The cell's <a href=\"/en-US-v0.14.1/reference/layout/grid/#parameters-fill\">fill</a> override.</p>"}],"types":["none","auto","color","gradient","tiling"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"stroke","details":[{"kind":"html","content":"<p>The cell's <a href=\"/en-US-v0.14.1/reference/layout/grid/#parameters-stroke\">stroke</a> override.</p>"}],"types":["none","length","color","gradient","stroke","tiling","dictionary"],"strings":[],"default":"<code><span class=\"typ-punct\">(</span><span class=\"typ-punct\">:</span><span class=\"typ-punct\">)</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"breakable","details":[{"kind":"html","content":"<p>Whether rows spanned by this cell can be placed in different pages.\nWhen equal to <code><span class=\"typ-key\">auto</span></code>, a cell spanning only fixed-size rows is\nunbreakable, while a cell spanning at least one <code><span class=\"typ-key\">auto</span></code>-sized row is\nbreakable.</p>"}],"types":["auto","bool"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true}],"returns":["content"],"scope":[]},{"path":["grid"],"name":"hline","title":"Grid Horizontal Line","keywords":[],"oneliner":"A horizontal line in the grid.","element":true,"contextual":false,"deprecationMessage":null,"deprecationUntil":null,"details":[{"kind":"html","content":"<p>A horizontal line in the grid.</p>\n<p>Overrides any per-cell stroke, including stroke specified through the grid's\n<code>stroke</code> field. Can cross spacing between cells created through the grid's\n<code>column-gutter</code> option.</p>\n<p>An example for this function can be found at the <a href=\"/en-US-v0.14.1/reference/model/table/#definitions-hline\" title=\"`table.hline`\"><code>table.hline</code></a> element.</p>"}],"self":false,"params":[{"name":"y","details":[{"kind":"html","content":"<p>The row above which the horizontal line is placed (zero-indexed).\nIf the <code>position</code> field is set to <code>bottom</code>, the line is placed below\nthe row with the given index instead (see <a href=\"/en-US-v0.14.1/reference/layout/grid/#definitions-hline-position\" title=\"`grid.hline.position`\"><code>grid.hline.position</code></a> for\ndetails).</p>\n<p>Specifying <code><span class=\"typ-key\">auto</span></code> causes the line to be placed at the row below the\nlast automatically positioned cell (that is, cell without coordinate\noverrides) before the line among the grid's children. If there is no\nsuch cell before the line, it is placed at the top of the grid (row 0).\nNote that specifying for this option exactly the total amount of rows\nin the grid causes this horizontal line to override the bottom border\nof the grid, while a value of 0 overrides the top border.</p>"}],"types":["auto","int"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"start","details":[{"kind":"html","content":"<p>The column at which the horizontal line starts (zero-indexed, inclusive).</p>"}],"types":["int"],"strings":[],"default":"<code><span class=\"typ-num\">0</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"end","details":[{"kind":"html","content":"<p>The column before which the horizontal line ends (zero-indexed,\nexclusive).\nTherefore, the horizontal line will be drawn up to and across column\n<code>end - 1</code>.</p>\n<p>A value equal to <code><span class=\"typ-key\">none</span></code> or to the amount of columns causes it to\nextend all the way towards the end of the grid.</p>"}],"types":["none","int"],"strings":[],"default":"<code><span class=\"typ-key\">none</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"stroke","details":[{"kind":"html","content":"<p>The line's stroke.</p>\n<p>Specifying <code><span class=\"typ-key\">none</span></code> removes any lines previously placed across this\nline's range, including hlines or per-cell stroke below it.</p>"}],"types":["none","length","color","gradient","stroke","tiling","dictionary"],"strings":[],"default":"<code><span class=\"typ-num\">1pt</span> <span class=\"typ-op\">+</span> black</code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"position","details":[{"kind":"html","content":"<p>The position at which the line is placed, given its row (<code>y</code>) - either\n<code>top</code> to draw above it or <code>bottom</code> to draw below it.</p>\n<p>This setting is only relevant when row gutter is enabled (and\nshouldn't be used otherwise - prefer just increasing the <code>y</code> field by\none instead), since then the position below a row becomes different\nfrom the position above the next row due to the spacing between both.</p>"}],"types":["alignment"],"strings":[],"default":"<code>top</code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true}],"returns":["content"],"scope":[]},{"path":["grid"],"name":"vline","title":"Grid Vertical Line","keywords":[],"oneliner":"A vertical line in the grid.","element":true,"contextual":false,"deprecationMessage":null,"deprecationUntil":null,"details":[{"kind":"html","content":"<p>A vertical line in the grid.</p>\n<p>Overrides any per-cell stroke, including stroke specified through the\ngrid's <code>stroke</code> field. Can cross spacing between cells created through\nthe grid's <code>row-gutter</code> option.</p>"}],"self":false,"params":[{"name":"x","details":[{"kind":"html","content":"<p>The column before which the vertical line is placed (zero-indexed).\nIf the <code>position</code> field is set to <code>end</code>, the line is placed after the\ncolumn with the given index instead (see <a href=\"/en-US-v0.14.1/reference/layout/grid/#definitions-vline-position\" title=\"`grid.vline.position`\"><code>grid.vline.position</code></a> for\ndetails).</p>\n<p>Specifying <code><span class=\"typ-key\">auto</span></code> causes the line to be placed at the column after\nthe last automatically positioned cell (that is, cell without\ncoordinate overrides) before the line among the grid's children. If\nthere is no such cell before the line, it is placed before the grid's\nfirst column (column 0).\nNote that specifying for this option exactly the total amount of\ncolumns in the grid causes this vertical line to override the end\nborder of the grid (right in LTR, left in RTL), while a value of 0\noverrides the start border (left in LTR, right in RTL).</p>"}],"types":["auto","int"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"start","details":[{"kind":"html","content":"<p>The row at which the vertical line starts (zero-indexed, inclusive).</p>"}],"types":["int"],"strings":[],"default":"<code><span class=\"typ-num\">0</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"end","details":[{"kind":"html","content":"<p>The row on top of which the vertical line ends (zero-indexed,\nexclusive).\nTherefore, the vertical line will be drawn up to and across row\n<code>end - 1</code>.</p>\n<p>A value equal to <code><span class=\"typ-key\">none</span></code> or to the amount of rows causes it to extend\nall the way towards the bottom of the grid.</p>"}],"types":["none","int"],"strings":[],"default":"<code><span class=\"typ-key\">none</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"stroke","details":[{"kind":"html","content":"<p>The line's stroke.</p>\n<p>Specifying <code><span class=\"typ-key\">none</span></code> removes any lines previously placed across this\nline's range, including vlines or per-cell stroke below it.</p>"}],"types":["none","length","color","gradient","stroke","tiling","dictionary"],"strings":[],"default":"<code><span class=\"typ-num\">1pt</span> <span class=\"typ-op\">+</span> black</code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"position","details":[{"kind":"html","content":"<p>The position at which the line is placed, given its column (<code>x</code>) -\neither <code>start</code> to draw before it or <code>end</code> to draw after it.</p>\n<p>The values <code>left</code> and <code>right</code> are also accepted, but discouraged as\nthey cause your grid to be inconsistent between left-to-right and\nright-to-left documents.</p>\n<p>This setting is only relevant when column gutter is enabled (and\nshouldn't be used otherwise - prefer just increasing the <code>x</code> field by\none instead), since then the position after a column becomes different\nfrom the position before the next column due to the spacing between\nboth.</p>"}],"types":["alignment"],"strings":[],"default":"<code>start</code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true}],"returns":["content"],"scope":[]},{"path":["grid"],"name":"header","title":"Grid Header","keywords":[],"oneliner":"A repeatable grid header.","element":true,"contextual":false,"deprecationMessage":null,"deprecationUntil":null,"details":[{"kind":"html","content":"<p>A repeatable grid header.</p>\n<p>If <code>repeat</code> is set to <code>true</code>, the header will be repeated across pages. For\nan example, refer to the <a href=\"/en-US-v0.14.1/reference/model/table/#definitions-header\" title=\"`table.header`\"><code>table.header</code></a> element and the <a href=\"/en-US-v0.14.1/reference/layout/grid/#parameters-stroke\" title=\"`grid.stroke`\"><code>grid.stroke</code></a>\nparameter.</p>"}],"self":false,"params":[{"name":"repeat","details":[{"kind":"html","content":"<p>Whether this header should be repeated across pages.</p>"}],"types":["bool"],"strings":[],"default":"<code><span class=\"typ-key\">true</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"level","details":[{"kind":"html","content":"<p>The level of the header. Must not be zero.</p>\n<p>This allows repeating multiple headers at once. Headers with different\nlevels can repeat together, as long as they have ascending levels.</p>\n<p>Notably, when a header with a lower level starts repeating, all higher\nor equal level headers stop repeating (they are &quot;replaced&quot; by the new\nheader).</p>"}],"types":["int"],"strings":[],"default":"<code><span class=\"typ-num\">1</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"children","details":[{"kind":"html","content":"<p>The cells and lines within the header.</p>"}],"types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":true,"settable":false}],"returns":["content"],"scope":[]},{"path":["grid"],"name":"footer","title":"Grid Footer","keywords":[],"oneliner":"A repeatable grid footer.","element":true,"contextual":false,"deprecationMessage":null,"deprecationUntil":null,"details":[{"kind":"html","content":"<p>A repeatable grid footer.</p>\n<p>Just like the <a href=\"/en-US-v0.14.1/reference/layout/grid/#definitions-header\" title=\"`grid.header`\"><code>grid.header</code></a> element, the footer can repeat itself on every\npage of the table.</p>\n<p>No other grid cells may be placed after the footer.</p>"}],"self":false,"params":[{"name":"repeat","details":[{"kind":"html","content":"<p>Whether this footer should be repeated across pages.</p>"}],"types":["bool"],"strings":[],"default":"<code><span class=\"typ-key\">true</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"children","details":[{"kind":"html","content":"<p>The cells and lines within the footer.</p>"}],"types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":true,"settable":false}],"returns":["content"],"scope":[]}]}}}