Skip to content
Navigation

Primary

Columns and width

Columns place several parts of a page side by side: text and code, questions and reference, a short description and the details. The :::container width block makes one part narrower than the page column — for example, a call to action in the centre.

Both blocks look at their own width, not the window width. So the same markup works in the documentation column between the menu and the outline, on a full-width landing page and inside another block.

Example

Columns 1:2

Version 1.10

What changed in the release.

  • A new “Status” column
  • An entry opens next to the list
  • Faster on large lists
Columns 1:2

Markup

Markdown
:::columns {ratio=2/1}
The first column: any Markdown.

---

The second column.
:::
  • Columns are separated by a --- line with blank lines before and after it.
  • A block has two to four columns. Inside is any Markdown, as well as cards, alerts, steps and collapsible blocks. The outer block needs one more colon: ::::columns around :::details.
  • When the block does not have enough width, the columns stack one under another in the same order.

Variants

Shares

ratio is the width shares from left to right: 2/1 makes the left column twice as wide as the right one, 1/1/1 gives three equal ones. The number of shares equals the number of columns. Without the parameter the columns are equal.

Text and a note 3:1

The default width of the entry panel.

52 characters

Text and a note 3:1

Blocks inside columns

You can put collapsible blocks, a card, an alert, a figure or steps into a column. Then the outer block has one more colon.

Questions and reference side by side

Frequently asked questions

In short

Docara 3, Apache 2.0 licence.

Questions and reference side by side

When to fold

fold is the block width below which the columns stack one under another: sm — below 32rem, md — below 44rem, lg — below 60rem, none — never. Without the parameter two columns fold at md, three and four at lg.

Three columns that do not fold

Markdown

JSON

HTML

Three columns that do not fold

Gap and alignment

gap is the space between columns on the SIMAI Framework spacing scale, from 0 to 8, by default 2. align is how the columns stand vertically: start — at the top, center — in the middle, end — at the bottom, stretch — the full height of the row.

Block width

:::container makes a block narrower than the page column. width is the share of the column: 1/4, 1/3, 1/2, 2/3, 3/4 or full. align is where the block stands: start, center or end. The 1/3, 1/2 and 2/3 shares can be centred. When the block does not have enough width (below 44rem), it takes the whole column.

Half in the centre

Start with one command. Docara does the rest.

Half in the centre
Two thirds from the start

A section caption or a note that should not run the full width.

Two thirds from the start

A width in characters (width=44, width=64) will come when SIMAI Framework releases text width steps.

Accessibility

  • Columns and width handle only placement. Readers and screen readers go through the columns in source order, left to right.
  • Do not reorder the parts for the sake of looks: on a narrow screen they stack in exactly this order.
  • A heading inside a column is an ordinary page heading. Keep the levels in order.

Parameters

:::columns

Parameter Values Default Sets
ratio 1/1, 2/1, 1/2, 3/1, 1/3, 3/2, 2/3, 1/1/1, 2/1/1, 1/2/1, 1/1/2, 1/1/1/1 — The column width shares on a wide screen, from left to right: 2/1 makes the left one twice as wide as the right one. The number of shares equals the number of columns. Without the parameter the columns are equal; on a phone they stack one under another.
gap 0, 1, 2, 3, 4, 5, 6, 7, 8 2 The space between columns on the SIMAI Framework spacing scale, from 0 to 8.
fold sm, md, lg, none — When the columns stack one under another, by the width of the block itself: sm — below 32rem, md — below 44rem, lg — below 60rem, none — never. Without the parameter two columns fold at md, three and four at lg.
align start, center, end, stretch — The vertical alignment of the columns: start — at the top, center — in the middle, end — at the bottom, stretch — stretched to the full height of the row.

:::container

Parameter Values Default Sets
width (required) 1/4, 1/3, 1/2, 2/3, 3/4, full — The block width as a share of the page column: 1/4, 1/3, 1/2, 2/3, 3/4 or full for the full width. Below 44rem the block takes the full width.
align start, center, end start Where the block stands: start — at the start of the line, center — in the centre (for 1/3, 1/2, 2/3), end — at the end of the line.

See also