generalcss

List

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

CSS Variables

VariableDefaultScopeDescription
--z-list-divider-border-colorvar(--z-border).z-list-divider > :nth-child(n + 2)Border color between divider-list items.
--z-list-divider-border-color-ovar(--z-border-o).z-list-divider > :nth-child(n + 2)Opacity applied to the divider-list border color.
--z-list-divider-border-width1px.z-list-divider > :nth-child(n + 2)Border width between divider-list items.
--z-list-divider-item-margin-top0.5rem.z-list-divider > :nth-child(n + 2)Top margin of divider-list items after the first.
--z-list-divider-item-padding-top0.5rem.z-list-divider > :nth-child(n + 2)Top padding of divider-list items after the first.
--z-list-indent32px.z-list-disc, .z-list-circle, .z-list-square, .z-list-decimal, .z-list-hyphenInline padding for lists with markers.
--z-list-item-margin-top0.5rem.z-list > :nth-child(n + 2), .z-list > * > ulTop margin between list items and before nested lists.
--z-list-marker-muted-colorvar(--z-muted-f).z-list-muted > ::markerMarker color of the muted variant.
--z-list-marker-muted-color-o100%.z-list-muted > ::markerOpacity applied to the muted marker color.
--z-list-marker-primary-colorvar(--z-primary).z-list-primary > ::markerMarker color of the primary variant.
--z-list-marker-primary-color-o100%.z-list-primary > ::markerOpacity applied to the primary marker color.
--z-list-marker-secondary-colorvar(--z-secondary-f).z-list-secondary > ::markerMarker color of the secondary variant.
--z-list-marker-secondary-color-o100%.z-list-secondary > ::markerOpacity applied to the secondary marker color.
--z-list-striped-background-colorvar(--z-muted).z-list-striped > :nth-of-type(odd)Background of odd striped rows.
--z-list-striped-background-color-ovar(--z-muted-o).z-list-striped > :nth-of-type(odd)Opacity applied to the striped background.
--z-list-striped-border-colorvar(--z-border).z-list-striped > *:nth-of-type(odd)Border color of odd striped rows.
--z-list-striped-border-color-ovar(--z-border-o).z-list-striped > *:nth-of-type(odd)Opacity applied to the striped border color.
--z-list-striped-border-width1px.z-list-striped > *:nth-of-type(odd)Top and bottom border width of odd striped rows.
--z-list-striped-item-padding0.5rem.z-list-striped > *Padding of striped items.

CSS Classes

ClassRoleApplies toDescription
.z-listroot.z-listBase list spacing; nested lists indent and items keep their bottom margin collapsed.
.z-list-circlemodifier.z-listCircle markers.
.z-list-decimalmodifier.z-listDecimal markers.
.z-list-discmodifier.z-listDisc markers.
.z-list-dividermodifier.z-listSeparates items with a top border and extra spacing.
.z-list-hyphenmodifier.z-listHyphen markers.
.z-list-mutedmodifier.z-listMuted-color markers.
.z-list-primarymodifier.z-listPrimary-color markers.
.z-list-secondarymodifier.z-listSecondary-color markers.
.z-list-squaremodifier.z-listSquare markers.
.z-list-stripedmodifier.z-listPadded items with a tinted background and borders on odd rows.