generalcss
List
List spacing and markers: style types, marker colors, divider and striped variants.
CSS Variables
| Variable | Default | Scope | Description |
|---|---|---|---|
--z-list-divider-border-color | var(--z-border) | .z-list-divider > :nth-child(n + 2) | Border color between divider-list items. |
--z-list-divider-border-color-o | var(--z-border-o) | .z-list-divider > :nth-child(n + 2) | Opacity applied to the divider-list border color. |
--z-list-divider-border-width | 1px | .z-list-divider > :nth-child(n + 2) | Border width between divider-list items. |
--z-list-divider-item-margin-top | 0.5rem | .z-list-divider > :nth-child(n + 2) | Top margin of divider-list items after the first. |
--z-list-divider-item-padding-top | 0.5rem | .z-list-divider > :nth-child(n + 2) | 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 | Inline padding for lists with markers. |
--z-list-item-margin-top | 0.5rem | .z-list > :nth-child(n + 2), .z-list > * > ul | Top margin between list items and before nested lists. |
--z-list-marker-muted-color | var(--z-muted-f) | .z-list-muted > ::marker | Marker color of the muted variant. |
--z-list-marker-muted-color-o | 100% | .z-list-muted > ::marker | Opacity applied to the muted marker color. |
--z-list-marker-primary-color | var(--z-primary) | .z-list-primary > ::marker | Marker color of the primary variant. |
--z-list-marker-primary-color-o | 100% | .z-list-primary > ::marker | Opacity applied to the primary marker color. |
--z-list-marker-secondary-color | var(--z-secondary-f) | .z-list-secondary > ::marker | Marker color of the secondary variant. |
--z-list-marker-secondary-color-o | 100% | .z-list-secondary > ::marker | Opacity applied to the secondary marker color. |
--z-list-striped-background-color | var(--z-muted) | .z-list-striped > :nth-of-type(odd) | Background of odd striped rows. |
--z-list-striped-background-color-o | var(--z-muted-o) | .z-list-striped > :nth-of-type(odd) | Opacity applied to the striped background. |
--z-list-striped-border-color | var(--z-border) | .z-list-striped > *:nth-of-type(odd) | Border color of odd striped rows. |
--z-list-striped-border-color-o | var(--z-border-o) | .z-list-striped > *:nth-of-type(odd) | Opacity applied to the striped border color. |
--z-list-striped-border-width | 1px | .z-list-striped > *:nth-of-type(odd) | Top and bottom border width of odd striped rows. |
--z-list-striped-item-padding | 0.5rem | .z-list-striped > * | 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. |