Lists
Lists are a great way of representing repeating content. Ascension supports the normal, unstyled lists as well as more custom ones.
Default lists
Ascension supports both ordered and unordered lists. You would write the markup as usual, like you see below:
Code | Preview |
---|---|
|
|
|
|
Custom lists: vertical
The custom vertical lists offer a bit more spacing than the traditional list and more customizability via certain helper classes. Start by adding the class of .vertical-list
to an unordered or ordered list. These lists are best used for more complex content, like the one below.
Code | Preview |
---|---|
|
|
Helper classes
The vertical list can be further customized by using one or more of the available helper classes.
Class | Description | Code & preview |
---|---|---|
extra-space |
Increases the top and bottom padding of each list item. |
|
with-border |
Adds a solid border to the bottom of each list item, except the last one. |
|
with-icon |
Adds an icon of your choosing to each list item. This requires the use of CSS sprites. Learn more in the dedicated documentation page. Please note that in this example the icon is rendered using the .icon-check class. The class of .with-icon simply adds the correct padding and styling for the icon. |
|
Custom lists: horizontal
Horizontal lists can be used to display items horizontally. They use the same markup as all the other lists, just a different starting class: .horizontal-list
. Let's take a look at some examples.
Code | Preview |
---|---|
|
Helper classes
The horizontal list can be further customized by using one or more of the available helper classes.
Class | Description | Code & preview |
---|---|---|
extra-space |
Increases the overall padding of each list item. |
|
extra-padding |
Adds additional top and bottom padding to the entire list. |
|
compact |
Reduces each list item's padding by 50%. |
|
faded |
Reduces the opacity of any any image or icon placed in the list to 25%. |
|