SU-SWS/decanter

View on GitHub
core/src/scss/utilities/mixins/modular-scale/_modular-typography.scss

Summary

Maintainability
Test Coverage

///
/// Specify font size using modular-scale, relative to the base font size (which varies by breakpoint).
/// `@include modular-typography(0)` returns the base font size for that breakpoint.
///
/// @name modular-typography
///
/// @example scss
///   @include modular-typography(2);
///   @include modular-typography(0);
///   @include modular-typography(-1);
///
/// @param {number (unitless)} $scale [1] - number (unitless) indicating how many steps to adjust font-size up or down the scale. e.g. entering '1' would create 1 step larger relative to base font size
///
/// @group mixin
@mixin modular-typography($scale: 1) {
  font-size: modular-scale($scale);
}