////
/// @group typography
/// Output base typography classes
////

@use "sass:map";
@use "../typography";
@use "../selector";
@use "../utils";

/// Prints typography base styles
/// - These are any type sizes that specify "base-class" in their configuration
/// - Type sizes with "base-class-prefixed" will be prefixed with the "type-" prefix
/// @example scss
///   @include ulu.base-typography-styles();
/// @example html {preview} Example of type size as base unprefixed
///   <span class="h1">A</span>
///   <span class="h2">A</span>
///   <span class="h3">A</span>
///   <span class="h4">A</span>
///   <span class="h5">A</span>
///   <span class="h6">A</span>

@mixin styles {

  @include utils.file-header('base', 'typography');

  $prefix: selector.class("type");

  // Print base typographic sizes
  @each $size, $values in typography.$sizes {
    @if (map.get($values, "base-class")) {
      @if (map.get($values, "base-class-prefixed")) {
        #{ $prefix }-#{$size} {
          @include typography.size($size);
        }
      } @else {
        .#{$size} {
          @include typography.size($size);
        }
      }
    }
  }
}