Grid
Columns with fixed, percent and fractional tracks. Layout in the DocStudio designer user guide.
A grid lays children out in columns. Children fill the cells from left to right, then start a new row.
Columns
The columns setting is a list of tracks:
| Track | Meaning |
|---|---|
A number such as 40 |
A fixed width in millimetres |
auto |
As wide as its content |
A percentage such as 30% |
A share of the grid width |
A fraction such as 1fr |
A share of the free space |
gap sets the spacing between cells in millimetres. A grid needs at least one column and allows up to 64.
Example
A two column "label and value" grid: columns 40 and auto, gap 2. Insert the children in pairs: label, value, label, value.
Tips
- Use the JSON tab or the inspector's JSON field to type the tracks:
[40, "auto"]. - Mixing
frtracks withautogives fluid layouts.
Limits
Cells cannot span several columns or rows. For tabular data use a table.