Lists ​

The list component provides a set of classes to style a group of related items with spacing and borders.

Base classes ​

Add .list to the list and .list-item to each item. The default styles remove the markers.

Safari list semantics

Use role="list" to preserve list semantics in Safari when the markers are removed.

See List utilities for classes that change marker style and position.

Use a stretched link to make the whole list item clickable. Each item in this layout should have a single link and no other interactive controls.

Variants ​

By default, no theme variants are generated.

If you are compiling your own version of Graupl, you can set the list module’s $themeable variable to true to generate the .primary, .secondary, and .tertiary variants.

Custom Properties ​

The following custom properties can be used to customize the list component:

PropertyDescriptionDefault Value
--graupl-list-padding-xThe horizontal padding of the list.var(--graupl-spacer-0)
--graupl-list-padding-yThe vertical padding of the list.var(--graupl-spacer-0)
--graupl-list-paddingThe padding of the list.var(--graupl-list-padding-y) var(--graupl-list-padding-x)
--graupl-list-margin-xThe horizontal margin of the list.var(--graupl-spacer-0)
--graupl-list-margin-yThe vertical margin of the list.var(--graupl-spacer-0)
--graupl-list-marginThe margin of the list.var(--graupl-list-margin-y) var(--graupl-list-margin-x)
--graupl-list-column-gapThe column gap of the list.var(--graupl-spacer-2)
--graupl-list-row-gapThe row gap of the list.var(--graupl-spacer-2)
--graupl-list-gapThe gap of the list.var(--graupl-list-row-gap) var(--graupl-list-column-gap)
--graupl-list-backgroundThe background colour of the list.var(--graupl-background)
--graupl-list-colorThe text colour of the list.var(--graupl-color)
--graupl-list-border-colorThe border colour of the list.var(--graupl-list-color)
--graupl-list-border-top-left-radiusThe border top left radius of the list.var(--graupl-border-top-left-radius)
--graupl-list-border-top-right-radiusThe border top right radius of the list.var(--graupl-border-top-right-radius)
--graupl-list-border-bottom-left-radiusThe border bottom left radius of the list.var(--graupl-border-bottom-left-radius)
--graupl-list-border-bottom-right-radiusThe border bottom right radius of the list.var(--graupl-border-bottom-right-radius)
--graupl-list-border-radiusThe border radius of the list.var(--graupl-list-border-top-left-radius) var(--graupl-list-border-top-right-radius) var(--graupl-list-border-bottom-right-radius) var(--graupl-list-border-bottom-left-radius)
--graupl-list-border-top-widthThe border top width of the list.0
--graupl-list-border-right-widthThe border right width of the list.0
--graupl-list-border-bottom-widthThe border bottom width of the list.0
--graupl-list-border-left-widthThe border left width of the list.0
--graupl-list-border-widthThe border width of the list.var(--graupl-list-border-top-width) var(--graupl-list-border-right-width) var(--graupl-list-border-bottom-width) var(--graupl-list-border-left-width)
--graupl-list-border-top-styleThe border top style of the list.var(--graupl-border-top-style)
--graupl-list-border-right-styleThe border right style of the list.var(--graupl-border-right-style)
--graupl-list-border-bottom-styleThe border bottom style of the list.var(--graupl-border-bottom-style)
--graupl-list-border-left-styleThe border left style of the list.var(--graupl-border-left-style)
--graupl-list-border-styleThe border style of the list.var(--graupl-list-border-top-style) var(--graupl-list-border-right-style) var(--graupl-list-border-bottom-style) var(--graupl-list-border-left-style)
--graupl-list-item-padding-xThe horizontal padding of the list item.var(--graupl-spacer-5)
--graupl-list-item-padding-yThe vertical padding of the list item.var(--graupl-spacer-3)
--graupl-list-item-paddingThe padding of the list item.var(--graupl-list-item-padding-y) var(--graupl-list-item-padding-x)
--graupl-list-item-transitionThe transition of the list item.transform var(--graupl-transition-duration-fast) var(--graupl-transition-timing-function)
--graupl-list-item-transition-reduced-motionThe transition of the list item when reduced motion is enabled.none
--graupl-list-item-transformThe transform of the list item.none
--graupl-list-item-hover-transformThe transform on hover of the list item.none
--graupl-list-item-backgroundThe background colour of the list item.var(--graupl-background)
--graupl-list-item-colorThe text colour of the list item.var(--graupl-color)
--graupl-list-item-border-colorThe border colour of the list item.var(--graupl-list-item-color)
--graupl-list-item-border-top-left-radiusThe border top left radius of the list item.var(--graupl-border-top-left-radius)
--graupl-list-item-border-top-right-radiusThe border top right radius of the list item.var(--graupl-border-top-right-radius)
--graupl-list-item-border-bottom-left-radiusThe border bottom left radius of the list item.var(--graupl-border-bottom-left-radius)
--graupl-list-item-border-bottom-right-radiusThe border bottom right radius of the list item.var(--graupl-border-bottom-right-radius)
--graupl-list-item-border-radiusThe border radius of the list item.var(--graupl-list-item-border-top-left-radius) var(--graupl-list-item-border-top-right-radius) var(--graupl-list-item-border-bottom-right-radius) var(--graupl-list-item-border-bottom-left-radius)
--graupl-list-item-border-top-widthThe border top width of the list item.var(--graupl-border-top-width)
--graupl-list-item-border-right-widthThe border right width of the list item.var(--graupl-border-right-width)
--graupl-list-item-border-bottom-widthThe border bottom width of the list item.var(--graupl-border-bottom-width)
--graupl-list-item-border-left-widthThe border left width of the list item.var(--graupl-border-left-width)
--graupl-list-item-border-widthThe border width of the list item.var(--graupl-list-item-border-top-width) var(--graupl-list-item-border-right-width) var(--graupl-list-item-border-bottom-width) var(--graupl-list-item-border-left-width)
--graupl-list-item-border-top-styleThe border top style of the list item.var(--graupl-border-top-style)
--graupl-list-item-border-right-styleThe border right style of the list item.var(--graupl-border-right-style)
--graupl-list-item-border-bottom-styleThe border bottom style of the list item.var(--graupl-border-bottom-style)
--graupl-list-item-border-left-styleThe border left style of the list item.var(--graupl-border-left-style)
--graupl-list-item-border-styleThe border style of the list item.var(--graupl-list-item-border-top-style) var(--graupl-list-item-border-right-style) var(--graupl-list-item-border-bottom-style) var(--graupl-list-item-border-left-style)

Sass variables ​

The following Sass variables can be used to customize the generation of the list component:

VariableDescriptionDefault Value
$selector-baseThe selector base for the component."."
$modifier-selector-baseThe selector base for component modifiers."."
$generate-base-theme-mapFlag to generate the base theme map.true
$themeableFlag to generate theme modifiers.false
$list-selector-baseThe list selector base."."
$list-selectorThe list selector."list"
$list-theme-selector-baseThe list theme selector base."."
$list-theme-selector-prefixThe list theme selector prefix.""
$list-item-selector-baseThe list item selector base."."
$list-item-selectorThe list item selector."list-item"
$list-item-transformThe list item transform.none
$list-item-hover-transformThe list item hover transform.none
$list-theme-mappingsMap of properties and shades for list variants.()
$list-theme-mapMap of property overrides for individual list variants.()