Skip to content
Navigation

Primary

Grid

A grid places self-contained blocks — most often cards — in columns. The grid looks at its own width, not the window width: below 44rem the blocks stack into one column, up to 60rem into two, wider into the set number. So in the documentation column between the menu and the outline the cards do not get squeezed.

Example

Grid
Markdown

A clear source format.

JSON

Checkable settings.

HTML

A finished static result.

Grid

Markup

Markdown
::::grid {columns=3}
:::card
#### First block

Content.
:::
:::card
#### Second block

Content.
:::
::::
  • The grid is the outer block, so it has one more colon than the nested ones: ::::grid around :::card.
  • Inside are Docara blocks, usually cards. The number of blocks need not match the number of columns: the extra ones move to the next row.

Variants

Columns

columns is how many columns there are on a wide screen, from one to four.

Two columns
Content

The first self-contained block.

Composition

The second self-contained block.

Two columns

Gap

gap is the space between blocks on the SIMAI Framework spacing scale, from 0 to 8. Keep one step for the whole group so that the rhythm is even.

Gap 4
Wider

The space between the cards is larger.

Air

Handy for large blocks.

Gap 4

How many fit

min is the smallest tile width in rem: 20, 24 or 32. As many tiles as fit go into a row, and the space left over is shared between them. min is written instead of columns.

Tiles no narrower than 20rem
Table

Rows and columns, sorting.

Board

Columns by status.

Feed

Entries one under another.

Tiles no narrower than 20rem

Accessibility

  • The grid handles only placement. Readers and screen readers go through the blocks in source order: left to right, top to bottom.
  • Do not reorder blocks for the sake of looks: on a phone they stack in exactly this order.
  • The nested blocks set the headings and the meaning, not the grid.

Parameters

Parameter Values Default Sets
columns 1, 2, 3, 4 3 How many columns there are when the grid has enough width. The grid looks at its own width, not the window width: below 44rem one column, up to 60rem two.
gap 0, 1, 2, 3, 4, 5, 6, 7, 8 2 The space between cells on the SIMAI Framework spacing scale, from 0 to 8.
min 20, 24, 32 — The smallest tile width in rem: as many tiles as fit go into a row. Instead of columns; the two are not written together.

See also