You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This default theme provides a clean, modern look using Tailwind CSS classes. You can use this as a starting point for your custom themes.
247
259
260
+
#### Lists: nested lists and `indent`
261
+
262
+
List styling is split between the base list (`list.ordered` / `list.unordered`), list items (`list.item`), optional spacing when the tree contains sublists (`list.nested`), and **per–nesting-level** marker classes (`list.indent`).
263
+
264
+
-**`list.indent.ordered`** and **`list.indent.unordered`** are **arrays of class strings**: index `0` is used for the top-level list, index `1` for the first nested list, and so on. The renderer uses Strapi’s optional `indentLevel` on a `list` node so that, when a child list is flagged with `indentLevel`, the depth is incremented for that subtree. If the index is out of range, no extra indent class is applied for that level.
265
+
- The theme helpers support a **three-segment** path for this branch: `getPropertyClass(theme, ['list', 'indent', 'ordered' | 'unordered'])` returns that array, and you can pick a single level with `[indentLevel]`. The two-segment `renderPropertyClasses(theme, ['list', 'ordered' | 'unordered'])` (and the same for `item`, `nested`, etc.) is unchanged. Using `renderPropertyClasses(theme, ['list', 'indent', format])`**joins the entire**`indent` array into one class string, which is appropriate only if you want all marker utilities on one element; for per-level markers, use `getPropertyClass` and index as above.
266
+
267
+
Example — extend only nested marker styles (Tailwind list-style steps):
data:Array<StrapiBlockListItem|StrapiBlockList>; // List items and nested lists
410
+
class?:string; // Additional CSS classes
411
+
theme:StrapiBlockTheme; // Theme configuration
378
412
format:'ordered'|'unordered'; // List type
379
-
nested:boolean; //Is the list nested?
413
+
nested?:boolean; //True when the tree contains sublists
380
414
}
381
415
```
382
416
417
+
`StrapiBlockList` nodes in `data` may include an optional `indentLevel` field from Strapi; the default list component uses it together with `theme.list.indent` to choose list-style classes by nesting depth. Import `StrapiBlockListItem` and `StrapiBlockList` from the package types when you type custom list blocks.
0 commit comments