@import 'type-setting';

$typography-set: (
  centi: (item: null)
) !default;

@mixin get-type($type-map: $typography-set) {
  @each $selector, $props in $type-map {
    $tracking: null !default;

    @if map-has-key($props, tracking) {
      $tracking: map-get($props, tracking);
    }

    .t-#{$selector} {
      @include type(map-get($props, font-size), map-get($props, leading),
          map-get($props, weight), $tracking);
    }
  }
}

@mixin get-style($key, $type-map: $typography-set) {
  $styles: null !default;
  $tracking: null !default;

  @if map-has-key($type-map, $key) {
    $styles: map-get($type-map, $key);

    @if map-has-key($styles, tracking) {
      $tracking: map-get($props, tracking);
    }

    @include type(map-get($styles, font-size), map-get($styles, leading),
        map-get($styles, weight), $tracking);
  }
}

@import 'type-setting';

$typography-set: (
  centi: (item: null)
) !default;

@mixin get-type($type-map: $typography-set) {
  @each $selector, $props in $type-map {
    $tracking: null !default;

    @if map-has-key($props, tracking) {
      $tracking: map-get($props, tracking);
    }

    .t-#{$selector} {
      @include type(map-get($props, font-size), map-get($props, leading),
          map-get($props, weight), $tracking);
    }
  }
}

@mixin get-style($key, $type-map: $typography-set) {
  $styles: null !default;
  $tracking: null !default;

  @if map-has-key($type-map, $key) {
    $styles: map-get($type-map, $key);

    @if map-has-key($styles, tracking) {
      $tracking: map-get($props, tracking);
    }

    @include type(map-get($styles, font-size), map-get($styles, leading),
        map-get($styles, weight), $tracking);
  } @else {
    @error "$key doesn't exist, was #{$key}";
  }
}

Add error handler for unknown key
Add error handler for unknown key
