grid
16 cases. Source: tests/grid.json.
#1 canonical
Source
:::grid{cols=3 gap=md}
- **Fast** — sub-50 ms cold start
- **Small** — 4 kB gzipped
- **Typed** — no `any` in the public API
:::
Rendered
Fast — sub-50 ms cold start
Small — 4 kB gzipped
Typed — no any in the public API
Downgrade
- **Fast** — sub-50 ms cold start
- **Small** — 4 kB gzipped
- **Typed** — no `any` in the public API
#2 defaults
Source
:::grid
- a
- b
:::
Rendered
a
b
Downgrade
- a
- b
#3 every cols value
Source
:::grid{cols=1}
- a
:::
:::grid{cols=4 gap=lg}
- a
:::
Rendered
a
a
Downgrade
- a
* a
#4 ordered list is allowed
Source
:::grid
1. a
2. b
:::
Rendered
a
b
Downgrade
1. a
2. b
#5 items with nested blocks
Source
:::grid
- a
- inner
- b
:::
Rendered
a
- inner
b
Downgrade
- a
- inner
- b
#6 nested inside a card
Source
::::card
:::grid
- a
:::
::::
Rendered
a
Downgrade
- a
#7 id and classes
Source
:::grid{#features .tight}
- a
:::
Rendered
a
Downgrade
- a
#8 unknown attribute warns
Source
:::grid{rows=2}
- a
:::
Rendered
a
Downgrade
- a
Diagnostics: DIRECTIVE_UNKNOWN_ATTRIBUTE
#9 unclosed fence
Source
:::grid
- a
Rendered
a
Downgrade
- a
Diagnostics: DIRECTIVE_UNCLOSED
#10 empty content
invalid
Source
:::grid
:::
Rendered
Downgrade
(empty)Diagnostics: GRID_CONTENT
#11 wrong content type: paragraph
invalid
Source
:::grid
not a list
:::
Rendered
not a list
Downgrade
not a list
Diagnostics: GRID_CONTENT
#12 wrong content type: two lists
invalid
Source
:::grid
- a
* b
:::
Rendered
- a
- b
Downgrade
- a
* b
Diagnostics: GRID_CONTENT
#13 wrong content type: list plus paragraph
invalid
Source
:::grid
- a
trailing
:::
Rendered
- a
trailing
Downgrade
- a
trailing
Diagnostics: GRID_CONTENT
#14 cols out of range
invalid
Source
:::grid{cols=5}
- a
:::
Rendered
a
Downgrade
- a
Diagnostics: DIRECTIVE_INVALID_ATTRIBUTE
#15 cols must be an integer
invalid
Source
:::grid{cols=two}
- a
:::
Rendered
a
Downgrade
- a
Diagnostics: DIRECTIVE_INVALID_ATTRIBUTE
#16 invalid gap
invalid
Source
:::grid{gap=xl}
- a
:::
Rendered
a
Downgrade
- a
Diagnostics: DIRECTIVE_INVALID_ATTRIBUTE