<section class="usage-guides">

  ### Breakpoints
  <hr class="ta-shortDivider">

  <div class="table cardinalTable">

  | breakpoint     | value     | variable  |
  | :---           | ---       | ---:      |
  | `xs`           | 0         | $ta-bp-xs |
  | `sm`           | 600px     | $ta-bp-sm |
  | `md`           | 960px     | $ta-bp-md |
  | `lg`           | 1440px    | $ta-bp-lg |
  | `xl`           | 1920px    | $ta-bp-xl |

  </div>

  These values are accessed by the `ta-media()` using the `$grid-breakpoints` map: 

  ```css
  $grid-breakpoints: (
    xs:         $ta-bp-xs,
    sm:         $ta-bp-sm,
    md:         $ta-bp-md,
    lg:         $ta-bp-lg,
    xl:         $ta-bp-xl,
  ) !default;
  ```
</section>

<section class="usage-guides">

  #### Mixins

  `ta-media()`
  
  This mixin generates a media query based on a list of conditions, while also allowing additional content to be passed in via the `@content` directive.

  Operators (`>`, `<`, `>=`, `<=`) are used in conjunction with breakpoints or values to dictate if the query should be greater/less/equal to the breakpoint. Values can be passed as breakpoint names (`sm`, `lg`, etc) and as a numerical measurement (`360px`, `40rem`, `80vw`).

  <section class="code-example">
  <div class="bpEx1 ta-blue500Bg">
  <div class="ta-fullContainer ta-purple500Bg -p-sm">
    <p>Breakpoint Example 1</p>
  </div>
  </div>
  </section>

  ```css
  .bpEx1 {
    padding: $spacing-sm;
    text-align: center;

    @include ta-media('>md') {
      padding: $spacing-xl;
    }
  }
  ```
  </section>

  <section class="usage-guides">

  ##### Support for Media Types

  Media expressions (`screen`, `print`, `handheld`, `speech`, `landscape`, `portrait`, `retina2x`, `retina3x`) can also be passed as conditions.

  ```css
    @include ta-media('screen') {};

    @include ta-media('print') {};

    @include ta-media('landscape') {};

    @include ta-media('retina2x') {};
  ```
</section>

  <section class="usage-guides">

  ##### Passing Multiple Operations

  Multiple Operations and media types may be passed to the mixin simultaneously.

  ```css
    .bpEx2 {
      /* your mobile first scss code here */
      
      @include ta-media('>=sm', '<md') {
        /* some scss code here */
      }

      @include ta-media('>=md', '<xl') {
        /* some scss code here */
      }

      @include ta-media('>20rem', 'retina2x') {
        /* some scss code here */
      }
    }
  ```

  </section>

<section class="usage-guides">

  ##### Expression Aliases

  If you find yourself using a group of expressions frequently, you can pass them to the mixin as a variable.

  <section class="code-example">

  <div class="bpAliases -p-md">
    Breakpoint Aliases
  </div>

  </section>

  ```css
  $phone: 0;
  $tablet: 480px;
  $desktop: 840px;

  $phone-only: ">=$#{phone}", "<#{tablet}";
  $tablet-only: ">=#{$tablet}", "<#{$desktop}";
  $desktop-only: ">=#{$desktop}";

  .bpAliases {
    background-color: $ta-blue500;
    color: $white;
    text-align: center;

    @include ta-media($tablet-only...) {
      background-color: $ta-red500;
    }

    @include ta-media($desktop-only...) {
      background-color: $ta-pink500;
    }
  }
  ```

</section>

<section class="usage-guides">

### Containers

<hr class="ta-shortDivider">

Default Containers

Containers are the most basic layout element in Cardinal and it is considered best practice to use them with our grid system.

The default `.ta-fullContainer` class fills the width up to 100% or the design specified max-breakpoint at 1980px.

The `.ta-container` max-width can be changed with simply modifier classes that follows the `-mw{'breakpointNumber'}` syntax.

This converts the breakpoint's pixel value to its rem equivalent, for example `-mw600`, `-mw960`,`-mw1440`, `-mw1920`.

<!-- begin code example -->
<section class="code-example -displayBlock -pb-none">

<div class="ta-zDepth-sm -pb-sm">
<div class="ta-fullContainer ta-grey700Bg -pl-md -py-sm"><p>Default with Max-width 100%</p></div>
<div class="ta-container ta-grey500Bg -mw600 -my-sm -mx-md -pl-md -py-sm"><p>Flex Container limited to 600px</p></div>
<div class="ta-container ta-grey450Bg -mw960 -mb-sm -mx-md -pl-md -py-sm"><p>Flex Container limited to 960px</p></div>
<div class="ta-container ta-grey400Bg -mw1440 -mb-sm -mx-md -pl-md -py-sm"><p>Flex Container limited to 1440px</p></div>
<div class="ta-container ta-grey300Bg -mw1920 -mx-md -pl-md -py-sm"><p>Flex Container limited to 1920px</p></div>
</div>

</section>
<!-- end begin code example -->

<!-- begin code snippet -->
```html
<div class="ta-zDepth-sm -pb-sm">
<div class="ta-fullContainer ta-grey700Bg -pl-md -py-sm"><p>Default with Max-width 100%</p></div>
<div class="ta-container ta-grey500Bg -mw600 -my-sm -mx-md -pl-md -py-sm"><p>Flex Container limited to 600px</p></div>
<div class="ta-container ta-grey450Bg -mw960 -mb-sm -mx-md -pl-md -py-sm"><p>Flex Container limited to 960px</p></div>
<div class="ta-container ta-grey400Bg -mw1440 -mb-sm -mx-md -pl-md -py-sm"><p>Flex Container limited to 1440px</p></div>
<div class="ta-container ta-grey300Bg -mw1920 -mx-md -pl-md -py-sm"><p>Flex Container limited to 1920px</p></div>
</div>
```

</section>

<section class="usage-guides -my-sm">

#### Flex Container

Flex containers have no max-width and fill all available horizontal space, and automatically apply `display: flex` to the container allowing content to wrap within it. Maximum width modifier classes can be paired with `.ta-flexContainer` to limit the container width.

<!-- begin code example -->
<section class="code-example -displayBlock -pb-none">

<div class="ta-zDepth-sm -py-3xl -px-md">
<div class="ta-flexContainer ta-grey600Bg -mb-sm -pl-md -py-sm"><p>Flex Container default max-width is 1920px</p></div>
<div class="ta-flexContainer ta-grey450Bg -mw960 -pl-md -py-sm"><p>Flex Container limited to 960px</p></div>
</div>

</section>
<!-- end begin code example -->

<!-- begin code snippet -->
```html
<div class="ta-zDepth-sm -py-3xl -px-md">
<div class="ta-flexContainer ta-grey700Bg -mb-sm -pl-md -py-sm"><p>Flex Container default max-width is 1920px</p></div>
<div class="ta-flexContainer ta-grey450Bg -mw960 -pl-md -py-sm"><p>Flex Container limited to 960px</p></div>
</div>
```
<!-- end code snippet -->

</section>

<section class="usage-guides">

### Rows

<hr class="ta-shortDivider">

Rows are the default base building blocks for the Cardinal 1D grid and by default will expand to fit all horizontal space. To create a row, add the `.ta-row` class to a `div` element:

<!-- begin code example -->
<section class="code-example -displayBlock">

<div class="ta-container ta-zDepth-sm">
  <div class="ta-row">
    <div class="ta-col ta-grey300Bg -xs12 -md4 -py-lg -px-2xl -centerText"><p>Column 1</p></div>
    <div class="ta-col ta-grey300Bg -xs12 -md4 -py-lg -px-2xl -centerText"><p>Column 2</p></div>
    <div class="ta-col ta-grey300Bg -xs12 -md4 -py-lg -px-2xl -centerText"><p>Column 3</p></div>
  </div>
</div>

</section>
<!-- end code snippet -->

<!-- begin code snippt -->
```html
<div class="ta-container ta-zDepth-sm">
  <div class="ta-row">
    <div class="ta-col ta-grey300Bg -xs12 -md4 -py-lg -px-2xl -centerText"><p>Column 1</p></div>
    <div class="ta-col ta-grey300Bg -xs12 -md4 -py-lg -px-2xl -centerText"><p>Column 2</p></div>
    <div class="ta-col ta-grey300Bg -xs12 -md4 -py-lg -px-2xl -centerText"><p>Column 3</p></div>
  </div>
</div>
```
<!-- end code snippt -->

</section>
