<section class="overview">

## Overview

Use the Cardinal typography classes and sass variables for font families and thier default sizes. For maintainability, please use these instead of hard-coding key values.

</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 @cardinal/typography with `$ npm install --save @cardinal/typography`

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/typography/typography";
```

#### Styles Included

<ul class="ta-ul -bulleted -py-none">
  <li> H1 - H6 </li>
  <li> Inline Link < a ></li>
  <li> Lists </li>
    <ul class="ta-ul -inline -py-none">
      <li><span>< ul ></span></li>
      <li><span>< ol ></span></li>
      <li><span>< li ></span></li>
      <li><span>< dl ></span></li>
      <li><span>< dt ></span></li>
      <li><span>< dd ></span></li>
    </ul>
    <p class="-my-none"> See <a href="/list/developer-reference"> lists </a> for list style and implementation guidance. </p>
</ul>

</section>

<section class="usage-guides">

### Cardinal's Font Stack

<hr class="ta-shortDivider">

Font names should mimic design reference to font names, i.e. Gobold.

<!-- begin code example -->
<div class="table cardinalTable">
<table>
  <thead>
    <tr>
      <th class="h3">font</th>
      <th class="h3">weight</th>
      <th class="h3">class</th>
    </tr>
  </thead>
  <tr>
    <td class="h4 ta-gobold -py-lg">gobold</td>
    <td class="h4 ta-gobold -py-lg">700</td>
    <td class="h4 ta-gobold -py-lg -lowercase">.ta-gobold</td>
  </tr>
  <tr>
    <td class="h4 ta-whitney-light -py-lg">whitney light</td>
    <td class="h4 ta-whitney-light -py-lg">300</td>
    <td class="h4 ta-whitney-light -py-lg -lowercase">.ta-whitney-light</td>
  </tr>
  <tr>
    <td class="h4 ta-whitney-book -py-lg">whitney book</td>
    <td class="h4 ta-whitney-book -py-lg">350</td>
    <td class="h4 ta-whitney-book -py-lg -lowercase">.ta-whitney-book</td>
  </tr>
  <tr>
    <td class="h4 ta-whitney -py-lg">whitney normal</td>
    <td class="h4 ta-whitney -py-lg">400</td>
    <td class="h4 ta-whitney -py-lg -lowercase">.ta-whitney</td>
  </tr>
  <tr>
    <td class="h4 ta-whitney-medium -py-lg">whitney medium</td>
    <td class="h4 ta-whitney-medium -py-lg">500</td>
    <td class="h4 ta-whitney-medium -py-lg -lowercase">.ta-whitney-medium</td>
  </tr>
  <tr>
    <td class="h4 ta-whitney-semibold -py-lg">whitney semibold</td>
    <td class="h4 ta-whitney-semibold -py-lg">600</td>
    <td class="h4 ta-whitney-semibold -py-lg -lowercase">.ta-whitney-semibold</td>
  </tr>
  <tr>
    <td class="h4 ta-whitney-bold -py-lg">whitney bold</td>
    <td class="h4 ta-whitney-bold -py-lg">700</td>
    <td class="h4 ta-whitney-bold -py-lg -lowercase">.ta-whitney-bold</td>
  </tr>
</table>
<!-- end begin code example -->

</section>

</section>

<section class="usage-guides">

### h1 to h6 elements

<hr class="ta-shortDivider">

The element is equivalent to a class and also creates the style. Elements with alternate header or body styles must include its respective class..

<!-- begin code example -->
<div class="table">
<table>
  <thead>
    <tr>
      <th class="h3">element</th>
      <th class="h3">style name</th>
      <th class="h3">class</th>
    </tr>
  </thead>
  <tr>
    <td class="h1"><code>< h1 ></code></td>
    <td class="h1">h1 header</td>
    <td class="h1 -lowercase"><code>.h1</code></td>
  </tr>
  <tr>
    <td class="h1-sm "><code>< h1 ></code></td>
    <td class="h1-sm">h1 header small</td>
    <td class="h1-sm -lowercase"><code>.h1-sm</code></td>
  </tr>
  <tr>
    <td class="h2"><code>< h2 ></code></td>
    <td class="h2">h2 header</td>
    <td class="h2 -lowercase"><code>.h2 </code></td>
  </tr>
  <tr>
    <td class="h2-sm "><code>< h2 ></code></td>
    <td class="h2-sm">h2 header small</td>
    <td class="h2-sm -lowercase"><code>.h2-sm</code></td>
  </tr>
  <tr>
    <td class="h3"><code>< h3 ></code></td>
    <td class="h3">h3 header</td>
    <td class="h3 -lowercase"><code>.h3</code></td>
  </tr>
  <tr>
    <td class="h4"><code>< h4 ></code></td>
    <td class="h4">h4 header</td>
    <td class="h4 -lowercase"><code>.h4</code></td>
  </tr>
  <tr>
    <td class="h5"><code>< h5 ></code></td>
    <td class="h5">label | h5 header</td>
    <td class="h5 -lowercase"><code>.label</code><code>.h5</code></td>
  </tr>
  <tr>
    <td class="h6"><code>< h6 ></code></td>
    <td class="h6">label small | h6 header</td>
    <td class="h6 -lowercase"><code>.label-sm</code><code>.h6</code></td>
  </tr>
  <tr>
    <td class="p-lg"><code>< p ></code></td>
    <td class="p-lg"> body large </td>
    <td class="p-lg -lowercase"><code>.p-lg </code></td>
  </tr>
  <tr>
    <td class="p"><code>< p ></code></td>
    <td class="p"> body </td>
    <td class="p -lowercase"><code>.p</code></td>
  </tr>
  <tr>
    <td class="p-sm"><code>< p ></code></td>
    <td class="p-sm"> body small </td>
    <td class="p-sm -lowercase"><code>.p-sm</code></td>
  </tr>
  <tr>
    <td class="p-xs"><code>< p ></code></td>
    <td class="p-xs"> body extra small </td>
    <td class="p-xs -lowercase"><code>.p-xs</code></td>
  </tr>
  <tr>
    <td class="display-lg"><code>< h3 ></code></td>
    <td class="display-lg"> display large </td>
    <td class="display-lg -lowercase"><code>.display-lg</code></td>
  </tr>
  <tr>
    <td class="display"><code>< h3 ></code></td>
    <td class="display"> display </td>
    <td class="display -lowercase"><code>.display</code></td>
  </tr>
  <tr>
    <td class="display-sm"><code>< h3 ></code></td>
    <td class="display-sm"> display small </td>
    <td class="display-sm -lowercase"><code>.display-sm</code></td>
  </tr>
</table>
<!-- end begin code example -->

</section>

<section class="usage-guides">

### classes for typography fonts

<hr class="ta-shortDivider">

Use the availalbe and easy to use Cardinal classes for typography.

<!-- begin code example -->
<section class="code-example -py-md">
<aside>
<h1>harlem</h1>
<h3 class="ta-whitney-light"> What happens to a dream deferred? <br >
Does it dry up<br>
like a raisin in the sun?<br>
Or fester like a sore—<br>
And then run?<br>
Does it stink like rotten meat?<br>
Or crust and sugar over—<br>
like a syrupy sweet?<br>
Maybe it just sags<br>
like a heavy load.<br>
<span class="ta-whitney-book -italic"> Or does it explode? </span>
</h3>
<h5 class="ta-whitney-bold -italic -capitalize -mt-md"> ~ langston hughes</h5>
</aside>
</section>
<!-- end begin code example -->

<!-- begin code snippet -->
```html
<h1>harlem</h1>
<h3 class="ta-whitney-light"> What happens to a dream deferred? <br >
Does it dry up<br>
like a raisin in the sun?<br>
Or fester like a sore—<br>
And then run?<br>
Does it stink like rotten meat?<br>
Or crust and sugar over—<br>
like a syrupy sweet?<br>
Maybe it just sags<br>
like a heavy load.<br>
<span class="ta-whitney-book -italic"> Or does it explode? </span>
</h3>
<h5 class="ta-whitney-bold -italic -capitalize -mt-md"> ~ langston hughes</h5>
```
<!-- end code example -->

</section>

<section class="usage-guides">

### sass variables

<hr class="ta-shortDivider">

All variables can be found in the source code. Displayed here are key defaults.

```scss
//Font family variables
$gobold:                        'Gobold', $sanSerif-fallback-fonts !default;
$whitney:                       'Whitney', $sanSerif-fallback-fonts !default;
$sentinel:                      'Sentinel', 'HCo Sentinel', $serif-fallback-fonts !default;

//Font Weights
$font-weight-light:             300 !default;
$font-weight-book:              350 !default;
$font-weight-normal:            400 !default;
$font-weight-medium:            500 !default;
$font-weight-semibold:          600 !default;
$font-weight-bold:              700 !default;
$font-weight-black:             800 !default;

//Default font variables
$default-font-size:             1rem !default;
$default-text-transform:        none !default;
$default-font-family:           'Whitney' !default;
$default-font-style:            normal !default;
$default-line-height:           1.5 !default;
$default-font-weight:           $font-weight-book !default;

//----- Header defaults -----
$h1-font-size:                  2.5rem !default;
$h1-line-height:                3.75 !default;
$h1-font-weight:                $font-weight-bold !default;
$h1-text-transform:             uppercase !default;

$h1-sm-line-height:             3 !default;
$h1-sm-font-size:               2rem !default;
$h1-sm-font-weight:             $h1-font-weight !default;
$h1-sm-text-transform:          $h1-text-transform !default;

$h2-font-size:                  1.875rem !default;
$h2-line-height:                2.5 !default;
$h2-font-weight:                $font-weight-semibold !default;
$h2-text-transform:             none !default;

$h2-sm-font-size:               1.125rem !default;
$h2-sm-line-height:             1.5 !default;
$h2-sm-font-weight:             $h2-font-weight !default;
$h2-sm-text-transform:          $h2-text-transform !default;

$h3-font-size:                  1.5rem !default;
$h3-line-height:                2 !default;
$h3-font-weight:                $font-weight-medium !default;
$h3-text-transform:             none !default;

$h4-font-size:                  1.125rem !default;
$h4-line-height:                $default-line-height !default;
$h4-font-weight:                $font-weight-medium !default;
$h4-text-transform:             none !default;

$h5-font-size:                  0.875rem !default;
$h5-line-height:                1.25 !default;
$h5-font-weight:                $font-weight-semibold !default;
$h5-text-transform:             uppercase !default;

$h6-font-size:                  0.75rem !default;
$h6-line-height:                1.125 !default;
$h6-font-weight:                $font-weight-semibold !default;
$h6-text-transform:             uppercase !default;

$body-font-size:                $p-font-size !default;
$body-line-height:              $p-line-height !default;
$body-font-weight:              $font-weight-book !default;

$body-lg-font-size:             1.5rem !default;
$body-lg-line-height:           2.125 !default;
$body-lg-font-weight:           $font-weight-light !default;

$body-sm-font-size:             0.875rem !default;
$body-sm-line-height:           1.125 !default;
$body-sm-font-weight:           $font-weight-medium !default;

$body-xs-font-size:             0.75rem !default;
$body-xs-line-height:           1 !default;
$body-xs-font-weight:           $font-weight-medium !default;

$display-lg-font-size:          3.125rem !default;
$display-lg-line-height:        3.75rem !default;
$display-lg-font-weight:        $font-weight-semibold !default;

$display-font-size:             2.25rem !default;
$display-line-height:           2.5 !default;
$display-font-weight:           $font-weight-semibold !default;

$display-sm-font-size:          1.5rem !default;
$display-sm-line-height:        1.75 !default;
$display-sm-font-weight:        $font-weight-semibold !default;
```

</section>
