# List (`.z-list`)

> List spacing and markers: style types, marker colors, divider and striped variants.

- **Kind:** css
- **Category:** general

## CSS Variables

| Variable | Default | Scope | Affects | Description |
| --- | --- | --- | --- | --- |
| `--z-list-divider-border-color` | `var(--z-border)` | `.z-list-divider > :nth-child(n + 2)` | `border-color` | Border color between divider-list items. |
| `--z-list-divider-border-color-o` | `var(--z-border-o)` | `.z-list-divider > :nth-child(n + 2)` | `border-color` | Opacity applied to the divider-list border color. |
| `--z-list-divider-border-width` | `1px` | `.z-list-divider > :nth-child(n + 2)` | `border-top-width` | Border width between divider-list items. |
| `--z-list-divider-item-margin-top` | `0.5rem` | `.z-list-divider > :nth-child(n + 2)` | `margin-block-start` | Top margin of divider-list items after the first. |
| `--z-list-divider-item-padding-top` | `0.5rem` | `.z-list-divider > :nth-child(n + 2)` | `padding-block-start` | Top padding of divider-list items after the first. |
| `--z-list-indent` | `32px` | `.z-list-disc, .z-list-circle, .z-list-square, .z-list-decimal, .z-list-hyphen` | `padding-inline-start` | Inline padding for lists with markers. |
| `--z-list-item-margin-top` | `0.5rem` | `.z-list > :nth-child(n + 2), .z-list > * > ul` | `margin-block-start` | Top margin between list items and before nested lists. |
| `--z-list-marker-muted-color` | `var(--z-muted-f)` | `.z-list-muted > ::marker` | `color` | Marker color of the muted variant. |
| `--z-list-marker-muted-color-o` | `100%` | `.z-list-muted > ::marker` | `color` | Opacity applied to the muted marker color. |
| `--z-list-marker-primary-color` | `var(--z-primary)` | `.z-list-primary > ::marker` | `color` | Marker color of the primary variant. |
| `--z-list-marker-primary-color-o` | `100%` | `.z-list-primary > ::marker` | `color` | Opacity applied to the primary marker color. |
| `--z-list-marker-secondary-color` | `var(--z-secondary-f)` | `.z-list-secondary > ::marker` | `color` | Marker color of the secondary variant. |
| `--z-list-marker-secondary-color-o` | `100%` | `.z-list-secondary > ::marker` | `color` | Opacity applied to the secondary marker color. |
| `--z-list-striped-background-color` | `var(--z-muted)` | `.z-list-striped > :nth-of-type(odd)` | `background-color` | Background of odd striped rows. |
| `--z-list-striped-background-color-o` | `var(--z-muted-o)` | `.z-list-striped > :nth-of-type(odd)` | `background-color` | Opacity applied to the striped background. |
| `--z-list-striped-border-color` | `var(--z-border)` | `.z-list-striped > *:nth-of-type(odd)` | `border-color` | Border color of odd striped rows. |
| `--z-list-striped-border-color-o` | `var(--z-border-o)` | `.z-list-striped > *:nth-of-type(odd)` | `border-color` | Opacity applied to the striped border color. |
| `--z-list-striped-border-width` | `1px` | `.z-list-striped > *:nth-of-type(odd)` | `border-bottom-width`, `border-top-width` | Top and bottom border width of odd striped rows. |
| `--z-list-striped-item-padding` | `0.5rem` | `.z-list-striped > *` | `padding` | Padding of striped items. |

## CSS Classes

| Class | Role | Applies to | Description |
| --- | --- | --- | --- |
| `.z-list` | `root` | `.z-list` | Base list spacing; nested lists indent and items keep their bottom margin collapsed. |
| `.z-list-circle` | `modifier` | `.z-list` | Circle markers. |
| `.z-list-decimal` | `modifier` | `.z-list` | Decimal markers. |
| `.z-list-disc` | `modifier` | `.z-list` | Disc markers. |
| `.z-list-divider` | `modifier` | `.z-list` | Separates items with a top border and extra spacing. |
| `.z-list-hyphen` | `modifier` | `.z-list` | Hyphen markers. |
| `.z-list-muted` | `modifier` | `.z-list` | Muted-color markers. |
| `.z-list-primary` | `modifier` | `.z-list` | Primary-color markers. |
| `.z-list-secondary` | `modifier` | `.z-list` | Secondary-color markers. |
| `.z-list-square` | `modifier` | `.z-list` | Square markers. |
| `.z-list-striped` | `modifier` | `.z-list` | Padded items with a tinted background and borders on odd rows. |

## Notes

- Marker color variants style the `::marker` pseudo-element; combine them with a style type such as `z-list-disc`.

## Guides

- [Styling with cls and stl](https://next.0build.dev/docs/guides/styling.md)
- [Translating Components](https://next.0build.dev/docs/guides/i18n.md)
- [Icon Resolution](https://next.0build.dev/docs/guides/icons.md)
- [The data-source Convention](https://next.0build.dev/docs/guides/data-source.md)
- [Openers & Triggers](https://next.0build.dev/docs/guides/triggers.md)
- [Dialog Behavior](https://next.0build.dev/docs/guides/dialogs.md)
- [Utilities](https://next.0build.dev/docs/guides/utilities.md)
- [Runtime](https://next.0build.dev/docs/guides/runtime.md)
