<section class="overview">

## Overview

Use Cardinal list classes for styling.

</section>

<section class="usage-guides">

<hr>

## Usage

### Installation

<hr class="ta-shortDivider">

Consult the <a href="http://dds.us.aegon.com/implementation" target="_blank" rel="noopener noreferrer">Implementation</a> section before continuing with component specific instructions.

Install lists via:
`$ npm install --save @cardinal/lists`

The source files included are written in <a href="http://sass-lang.com/" target="_blank" rel="noopener noreferrer">Sass</a>. Point the sass include-path to the node_modules directory and import with:

```javascript
@import "node_modules/@cardinal/lists/lists";
```

</section>

<section  class="usage-guides">

  <h3> List Styles &amp; Classes </h3>
  <hr class="ta-shortDivider">
  <h4> List </h4>

  Use the `.ta-ul` class to created an unordered and unstyled list. Styles for `<li>` are adjusted according to the Cardinal style specification. A `.li` class is available to overide potential conflicts in existing application styles.

  <!-- begin code example -->
  <section class="code-example -py-md">
  <ul class="ta-ul">
    <li>List item</li>
    <li>List item</li>
    <li>List item</li>
  </ul>
  <!-- end begin code example -->
  </section>

  <!-- begin code snippet -->
  ```html
  <ul class="ta-ul">
    <li>List item</li>
    <li>List item</li>
    <li>List item</li>
  </ul>
  ```
  <!-- end code example -->

</section>

<section  class="usage-guides">
  <h4> Bulleted List </h4>

  Use the modifier `-bulleted` to create a bulleted list.

  <!-- begin code example -->
  <section class="code-example -py-md">
  <ul class="ta-ul -bulleted">
    <li>List item</li>
    <li>List item</li>
    <li>List item</li>
  </ul>
  <!-- end begin code example -->
  </section>

  <!-- begin code snippet -->
  ```html
  <ul class="ta-ul -bulleted">
    <li>List item</li>
    <li>List item</li>
    <li>List item</li>
  </ul>
  ```
  <!-- end code example -->

</section>

<section  class="usage-guides">
  <h4> Ordered List </h4>

  Use the modifier `-ordered` to create an ordered list.

  <!-- begin code example -->
  <section class="code-example -py-md">
  <ol class="ta-ol -ordered">
    <li>List item</li>
    <li>List item</li>
    <li>List item</li>
  </ol>
  <!-- end begin code example -->
  </section>

  <!-- begin code snippet -->
  ```html
  <ol class="ta-ol -ordered">
    <li>List item</li>
    <li>List item</li>
    <li>List item</li>
  </ol>
  ```
  <!-- end code example -->

</section>

<section  class="usage-guides">
  <h4> Inline List </h4>

  Use the modifier `-inline` to create an inline list.

  <!-- begin code example -->
  <section class="code-example -py-md">
  <ul class="ta-ul -inline">
    <li>List item</li>
    <li>List item</li>
    <li>List item</li>
  </ul>
  <!-- end begin code example -->
  </section>

  <!-- begin code snippet -->
  ```html
  <ul class="ta-ul -inline">
    <li>List item</li>
    <li>List item</li>
    <li>List item</li>
  </ul>
  ```
  <!-- end code example -->

</section>

<section  class="usage-guides">
  <h4> Bulleted Inline List </h4>

  Combine modifiers `-bulleted` & `-inline` to create an inline bulleted list.

  <!-- begin code example -->
  <section class="code-example -py-md">
  <ul class="ta-ul -bulleted -inline">
    <li>List item</li>
    <li>List item</li>
    <li>List item</li>
  </ul>
  <!-- end begin code example -->
  </section>

  <!-- begin code snippet -->
  ```html
  <ul class="ta-ul -bulleted -inline">
    <li>List item</li>
    <li>List item</li>
    <li>List item</li>
  </ul>
  ```
  <!-- end code example -->

</section>

<section  class="usage-guides">
  <h4> Link List </h4>

  Use the modifier `-link` to update the default `a` element style inside of a list.

  <!-- begin code example -->
  <section class="code-example -py-md">
  <ul id="listOfLinks" class="ta-ul -linked">
    <li><a href="/lists/developer-reference/#listOfLinks">List item</a></li>
    <li><a href="/lists/developer-reference/#listOfLinks">List item</a></li>
    <li><a href="/lists/developer-reference/#listOfLinks">List item</a></li>
  </ul>
  <!-- end begin code example -->
  </section>

  <!-- begin code snippet -->
  ```html
  <ul id="listOfLinks" class="ta-ul -linked">
    <li><a href="/lists/developer-reference/#listOfLinks">List item</a></li>
    <li><a href="/lists/developer-reference/#listOfLinks">List item</a></li>
    <li><a href="/lists/developer-reference/#listOfLinks">List item</a></li>
  </ul>
  ```
  <!-- end code example -->

</section>

<section  class="usage-guides">
  <h4> Icon Button Linked List </h4>

  Use the modifier `-buttons` to update `li` elements to properly house buttons in a list. Refer to <a href="/buttons/developer-reference/#buttonLinks"> Buttons As Links</a> button implementation.

  <!-- begin code example -->
  <section class="code-example -py-md">
  <ul class="ta-ul -buttons">
    <li><button class="ta-button ta-download -secondary">Text With Icon Left</button></li>
    <li><button class="ta-button ta-download -secondary">Text With Icon Left</button></li>
    <li><button class="ta-button ta-download -secondary">Text With Icon Left</button></li>
    <li><button class="ta-button ta-download -secondary">Text With Icon Left</button></li>
  </ul>
  <!-- end begin code example -->
  </section>

  <!-- begin code snippet -->
  ```html
  <ul class="ta-ul -buttons">
    <li><button class="ta-button ta-download -secondary">Text With Icon Left</button></li>
    <li><button class="ta-button ta-download -secondary">Text With Icon Left</button></li>
    <li><button class="ta-button ta-download -secondary">Text With Icon Left</button></li>
    <li><button class="ta-button ta-download -secondary">Text With Icon Left</button></li>
  </ul>
  ```
  <!-- end code example -->

</section>

<section  class="usage-guides">
  <h4> Description List </h4>

  Use the `.ta-dl` class  to create a description list. Styles for `<dt>` , `<dl>` and `<dd>` are adjusted according to the Cardinal style specifications. Classes of each are available to override potential conflicts in existing application styles.

  <!-- begin code example -->
  <section class="code-example -py-md">
  <dl class="ta-dl">
    <dt class="dt"> Beast of Bodmin </dt>
    <dd class="dd"> A large feline inhabiting Bodmin Moor. </dd>
    <dt class="dt"> Morgawr </dt>
    <dd class="dd"> A sea serpent. </dd>
    <dt class="dt"> Owlman </dt>
    <dd class="dd"> A giant owl-like creature. </dd>
  </dl>
  <!-- end begin code example -->
  </section>

  <!-- begin code snippet -->
  ```html
  <dl class="ta-dl">
    <dt class="dt"> Beast of Bodmin </dt>
    <dd class="dd"> A large feline inhabiting Bodmin Moor. </dd>
    <dt class="dt"> Morgawr </dt>
    <dd class="dd"> A sea serpent. </dd>
    <dt class="dt"> Owlman </dt>
    <dd class="dd"> A giant owl-like creature. </dd>
  </dl>
  ```
  <!-- end code example -->

</section>

<section class="usage-guides">

### Accessiblity

<hr class="ta-shortDivider">

When list markup is used semantically, assistive technologies are able to provide information to users as they navigate lists, like total number of items and the relative position of each item.

Assistive technologies provide additional navigation commands for lists, such as "Go to next List item" and "Go to next list" (if more than one list is provided sequentially or nested).

If a project won't allow for use of semantic html list elements, employ the classes provided along with the <a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Listitem_role" target="_blank" rel="noopener noreferrer"> ARIA listitem role</a>.

**Note:**  Always use semantic HTML elements for markup as provided in the List Styles &amp; Classes section. Use of `role="list"` and `role="listitem"` is discouraged.  

  <!-- begin code example -->
  <section class="code-example -py-md">

  <section role="list" class="ta-ul">
    <div role="listitem" class="li">List item 1</div>
    <div role="listitem" class="li">List item 2</div>
    <div role="listitem" class="li">List item 3</div>
  </section>
  <!-- end begin code example -->
  </section>

  <!-- begin code snippet -->
  ```html
  <section role="list" class="ta-ul">
    <div role="listitem" class="li">List item 1</div>
    <div role="listitem" class="li">List item 2</div>
    <div role="listitem" class="li">List item 3</div>
  </section>
  ```
  <!-- end code example -->

 **Note:** Ordered and bulleted lists will not work as they require a corresponding element.  Only unordered and unstyled lists are avalable for such use.

</section>
