<section class="overview">

## Overview

Manage visual elevation and emphasis in the UI between two surfaces using Cardinal CSS classes and mixins.

</section>

<section class="usage-guides">

<hr>

## Usage

### Installation

<hr class="ta-shortDivider">

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

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

</section>

<section class="usage-guides">

### Classes

<hr class="ta-shortDivider">

Z depth classes follow breakpoint syntax displaying the depth which is computed as `box-shadow` of an element.

<!-- begin code example -->
<section class="code-example">
<div class="ta-row -justify-content-between">
<div class="ta-col -xs12 -sm2 ta-zDepth-xs"><p class="-py-6xl -centerText">.xs</p></div>
<div class="ta-col -xs12 -sm2 ta-zDepth-sm"><p class="-py-6xl -centerText">.sm</p></div>
<div class="ta-col -xs12 -sm2 ta-zDepth-md"><p class="-py-6xl -centerText">.md</p></div>
<div class="ta-col -xs12 -sm2 ta-zDepth-lg"><p class="-py-6xl -centerText">.lg</p></div>
<div class="ta-col -xs12 -sm2 ta-zDepth-xl"><p class="-py-6xl -centerText">.xl</p></div>
</div>
</section>
<!-- end begin code example -->

<!-- begin code snippet -->
```html
<div class="ta-row -justify-content-between">
<div class="ta-col -xs12 -sm2 ta-zDepth-xs"><p class="-py-6xl -centerText">.xs</p></div>
<div class="ta-col -xs12 -sm2 ta-zDepth-sm"><p class="-py-6xl -centerText">.sm</p></div>
<div class="ta-col -xs12 -sm2 ta-zDepth-md"><p class="-py-6xl -centerText">.md</p></div>
<div class="ta-col -xs12 -sm2 ta-zDepth-lg"><p class="-py-6xl -centerText">.lg</p></div>
<div class="ta-col -xs12 -sm2 ta-zDepth-xl"><p class="-py-6xl -centerText">.xl</p></div>
</div>
```
<!-- end code snippet -->

</section>

<section class="usage-guides">

### Mixins & Variables

<hr class="ta-shortDivider">

#### Mixin

`ta-z-depth()`

To apply Z depth via CSS directly, add it as `box-shadow` using the `ta-z-depth()` mixin.

```css
.card {
  box-shadow: ta-z-depth('xs');
}

.card-expanded {
  box-shadow: ta-z-depth('lg');
}

.dropdown {
  box-shadow: ta-z-depth('sm');
}

.dialogs {
  box-shadow: ta-z-depth('xl');
}
```

<div class="table cardinalTable">

Following is the list of available values available to pass to the z depth mixin, `ta-z-depth()`.

| Available Values  | z-depth        |
| :---              |     ---:       |
| `xs`              | $ta-z-depth-xs |
| `sm`              | $ta-z-depth-sm |
| `md`              | $ta-z-depth-md |
| `lg`              | $ta-z-depth-lg |
| `xl`              | $ta-z-depth-xl |

</div>

<section class="usage-guides">

#### Variables

Following is a list of all available Z depth variables and their values.

```css
$ta-z-depth-none:  none;

$ta-z-depth-xs:  0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);

$ta-z-depth-sm:  0 1px 5px 0 rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.14);

$ta-z-depth-md:  0 1px 8px 0 rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 3px 3px 0 rgba(0, 0, 0, 0.14);

$ta-z-depth-lg:  0 1px 10px 0 rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.14);

$ta-z-depth-xl:  0 3px 5px 0 rgba(0, 0, 0, 0.2), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 6px 10px 0 rgba(0, 0, 0, 0.14);
```

</div>

</section>
</main>
