{"route":"/en-US-v0.13.1/reference/layout/grid/","title":"Grid","description":"Documentation for the `grid` function.","part":null,"outline":[{"id":"summary","name":"Summary","children":[]},{"id":"examples","name":"Examples","children":[]},{"id":"styling-the-grid","name":"Styling the grid","children":[{"id":"stroke-styling-precedence","name":"Stroke styling precedence","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-fill","name":"fill","children":[]},{"id":"parameters-align","name":"align","children":[]},{"id":"parameters-stroke","name":"stroke","children":[]},{"id":"parameters-inset","name":"inset","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-fill","name":"fill","children":[]},{"id":"definitions-cell-align","name":"align","children":[]},{"id":"definitions-cell-inset","name":"inset","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-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,"deprecation":null,"details":"<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\n<a href=\"/en-US-v0.13.1/reference/model/table/\"><code>table</code></a> element is intended for, in broad terms, presenting\nmultiple related data points. In the future, Typst will annotate its output\nsuch that screenreaders will announce content in <code>table</code> as tabular while a\ngrid's content will be announced no different than multiple content blocks\nin the document flow. Set and show rules on one of these elements do not\naffect the other.</p>\n<p>A grid's sizing is determined by the track sizes specified in the arguments.\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.13.1/reference/layout/grid/#definitions-cell\"><code>grid.cell</code></a> to make an individual cell\nspan two grid tracks.</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.13.1/assets/9d4e8714750ff00270cb0fc4f0bc09ae.png\" alt=\"Preview\"></div></div>\n<p>You can also <a href=\"/en-US-v0.13.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.13.1/assets/aad11723d596b2524d0d3d305af58082.png\" alt=\"Preview\"></div></div>\n<h2 id=\"styling-the-grid\">Styling the grid</h2>\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.13.1/reference/layout/grid/#parameters-fill\"><code>fill</code></a> to give all cells a background</li>\n<li><a href=\"/en-US-v0.13.1/reference/layout/grid/#parameters-align\"><code>align</code></a> to change how cells are aligned</li>\n<li><a href=\"/en-US-v0.13.1/reference/layout/grid/#parameters-inset\"><code>inset</code></a> to optionally add internal padding to each cell</li>\n<li><a href=\"/en-US-v0.13.1/reference/layout/grid/#parameters-stroke\"><code>stroke</code></a> to optionally enable grid lines with a certain\nstroke</li>\n</ul>\n<p>If you need to override one of the above options for a single cell, you can\nuse the <a href=\"/en-US-v0.13.1/reference/layout/grid/#definitions-cell\"><code>grid.cell</code></a> element. Likewise, you can override\nindividual grid lines with the <a href=\"/en-US-v0.13.1/reference/layout/grid/#definitions-hline\"><code>grid.hline</code></a> and\n<a href=\"/en-US-v0.13.1/reference/layout/grid/#definitions-vline\"><code>grid.vline</code></a> elements.</p>\n<p>Alternatively, if you need the appearance options to depend on a cell's\nposition (column and row), you may specify a function to <code>fill</code> or <code>align</code>\nof the form <code>(column, row) =&gt; value</code>. You may also use a show rule on\n<a href=\"/en-US-v0.13.1/reference/layout/grid/#definitions-cell\"><code>grid.cell</code></a> - see that element's examples or the examples\nbelow for more information.</p>\n<p>Locating most of your styling in set and show rules is recommended, as it\nkeeps the grid's or table's actual usages clean and easy to read. It also\nallows you to easily change the grid's appearance in one place.</p>\n<h3 id=\"stroke-styling-precedence\">Stroke styling precedence</h3>\n<p>There are three ways to set the stroke of a grid cell: through\n<a href=\"/en-US-v0.13.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.13.1/reference/layout/grid/#definitions-hline\"><code>grid<span class=\"typ-punct\">.</span>hline</code></a> and <a href=\"/en-US-v0.13.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.13.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>","example":null,"self":false,"params":[{"name":"columns","details":"<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>","example":null,"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":"<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>","example":null,"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":"<p>The gaps between rows and columns.</p>\n<p>If there are more gutters than defined sizes, the last gutter is\nrepeated.</p>\n<p>This is a shorthand to set <code>column-gutter</code> and <code>row-gutter</code> to the same\nvalue.</p>","example":null,"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":"column-gutter","details":"<p>The gaps between columns.</p>","example":null,"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":"<p>The gaps between rows.</p>","example":null,"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":"fill","details":"<p>How to fill the cells.</p>\n<p>This can be a color or a function that returns a color. The function\nreceives the cells' column and row indices, starting from zero. This can\nbe used to implement striped grids.</p>","example":"<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.13.1/assets/616a52b479521e50994e6526049b3d5d.png\" alt=\"Preview\"></div></div>","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":"align","details":"<p>How to align the cells' content.</p>\n<p>This can either be a single alignment, an array of alignments\n(corresponding to each column) or a function that returns an alignment.\nThe function receives the cells' column and row indices, starting from\nzero. If set to <code><span class=\"typ-key\">auto</span></code>, the outer alignment is used.</p>\n<p>You can find an example for this argument at the\n<a href=\"/en-US-v0.13.1/reference/model/table/#parameters-align\"><code>table.align</code></a> parameter.</p>","example":null,"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":"stroke","details":"<p>How to <a href=\"/en-US-v0.13.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 <code>gutter</code> option, or to override the stroke between\nmultiple specific cells, consider specifying one or more of\n<a href=\"/en-US-v0.13.1/reference/layout/grid/#definitions-hline\"><code>grid.hline</code></a> and <a href=\"/en-US-v0.13.1/reference/layout/grid/#definitions-vline\"><code>grid.vline</code></a> alongside\nyour grid cells.</p>","example":"<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>\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.13.1/assets/d2b36ee1992a9899d60d6b5bb36c9993.png\" alt=\"Preview\"></div></div>","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":"inset","details":"<p>How much to pad the cells' content.</p>\n<p>You can find an example for this argument at the\n<a href=\"/en-US-v0.13.1/reference/model/table/#parameters-inset\"><code>table.inset</code></a> parameter.</p>","example":null,"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":"children","details":"<p>The contents of the grid cells, plus any extra grid lines specified\nwith the <a href=\"/en-US-v0.13.1/reference/layout/grid/#definitions-hline\"><code>grid.hline</code></a> and <a href=\"/en-US-v0.13.1/reference/layout/grid/#definitions-vline\"><code>grid.vline</code></a>\nelements.</p>\n<p>The cells are populated in row-major order.</p>","example":null,"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. You can use this function in the argument list of a grid","element":true,"contextual":false,"deprecation":null,"details":"<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>","example":"<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.13.1/assets/85a80ca20c73818a35cfef42a986e689.png\" alt=\"Preview\"></div></div>\n<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.13.1/reference/model/table/#definitions-cell\"><code>table.cell</code></a> element to learn\nmore about this.</p>","self":false,"params":[{"name":"body","details":"<p>The cell's body.</p>","example":null,"types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":false,"settable":false},{"name":"x","details":"<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>","example":"<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.13.1/assets/d4295624ceed58586c2323592650f5a3.png\" alt=\"Preview\"></div></div>","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":"<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>","example":"<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.13.1/assets/2aa1128c7723558f82b243152265c648.png\" alt=\"Preview\"></div></div>","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":"<p>The amount of columns spanned by this cell.</p>","example":null,"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":"<p>The amount of rows spanned by this cell.</p>","example":null,"types":["int"],"strings":[],"default":"<code><span class=\"typ-num\">1</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"fill","details":"<p>The cell's <a href=\"/en-US-v0.13.1/reference/layout/grid/#parameters-fill\">fill</a> override.</p>","example":null,"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":"align","details":"<p>The cell's <a href=\"/en-US-v0.13.1/reference/layout/grid/#parameters-align\">alignment</a> override.</p>","example":null,"types":["auto","alignment"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"inset","details":"<p>The cell's <a href=\"/en-US-v0.13.1/reference/layout/grid/#parameters-inset\">inset</a> override.</p>","example":null,"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":"stroke","details":"<p>The cell's <a href=\"/en-US-v0.13.1/reference/layout/grid/#parameters-stroke\">stroke</a> override.</p>","example":null,"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":"<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>","example":null,"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,"deprecation":null,"details":"<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\n<a href=\"/en-US-v0.13.1/reference/model/table/#definitions-hline\"><code>table.hline</code></a> element.</p>","example":null,"self":false,"params":[{"name":"y","details":"<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 that field's docs 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>","example":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":"start","details":"<p>The column at which the horizontal line starts (zero-indexed, inclusive).</p>","example":null,"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":"<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>","example":null,"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":"<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>","example":null,"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":"<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>","example":null,"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,"deprecation":null,"details":"<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>","example":null,"self":false,"params":[{"name":"x","details":"<p>The column before which the horizontal 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 that field's docs 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>","example":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":"start","details":"<p>The row at which the vertical line starts (zero-indexed, inclusive).</p>","example":null,"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":"<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>","example":null,"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":"<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>","example":null,"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":"<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>","example":null,"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,"deprecation":null,"details":"<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.13.1/reference/model/table/#definitions-header\"><code>table.header</code></a> element and the\n<a href=\"/en-US-v0.13.1/reference/layout/grid/#parameters-stroke\"><code>grid.stroke</code></a> parameter.</p>","example":null,"self":false,"params":[{"name":"repeat","details":"<p>Whether this header should be repeated across pages.</p>","example":null,"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":"<p>The cells and lines within the header.</p>","example":null,"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,"deprecation":null,"details":"<p>A repeatable grid footer.</p>\n<p>Just like the <a href=\"/en-US-v0.13.1/reference/layout/grid/#definitions-header\"><code>grid.header</code></a> element, the footer can repeat\nitself on every page of the table.</p>\n<p>No other grid cells may be placed after the footer.</p>","example":null,"self":false,"params":[{"name":"repeat","details":"<p>Whether this footer should be repeated across pages.</p>","example":null,"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":"<p>The cells and lines within the footer.</p>","example":null,"types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":true,"settable":false}],"returns":["content"],"scope":[]}]}}}