Typography Utilities

The typography utilities provide a set of classes to adjust the font-size, font-weight, font-style, text-transform properties of elements.

Text Styles

Paragraph

Applies the default paragraph styling to an element.

css
  .text-paragraph {
    font-size: var(--graupl-paragraph-font-size);
    font-weight: var(--graupl-paragraph-font-weight);
    font-style: var(--graupl-paragraph-font-style);
    font-variant: var(--graupl-paragraph-font-variant);
    color: var(--graupl-paragraph-color);
    font-family: var(--graupl-paragraph-font-family);
    line-height: var(--graupl-paragraph-line-height);
    letter-spacing: var(--graupl-paragraph-letter-spacing);
    word-spacing: var(--graupl-paragraph-word-spacing);
    margin: var(--graupl-paragraph-margin);
  }

Small

Applies the default small text styling to an element.

css
  .text-small {
    font-size: var(--graupl-small-font-size);
    font-weight: var(--graupl-small-font-weight);
    font-style: var(--graupl-small-font-style);
    font-variant: var(--graupl-small-font-variant);
    color: var(--graupl-small-color);
    font-family: var(--graupl-small-font-family);
    line-height: var(--graupl-small-line-height);
    letter-spacing: var(--graupl-small-letter-spacing);
    word-spacing: var(--graupl-small-word-spacing);
    margin: var(--graupl-small-margin);
  }

H1

Applies the default h1 styling to an element.

css
  .text-h1 {
    font-size: var(--graupl-h1-font-size);
    font-weight: var(--graupl-h1-font-weight);
    font-style: var(--graupl-h1-font-style);
    font-variant: var(--graupl-h1-font-variant);
    color: var(--graupl-h1-color);
    font-family: var(--graupl-h1-font-family);
    line-height: var(--graupl-h1-line-height);
    letter-spacing: var(--graupl-h1-letter-spacing);
    word-spacing: var(--graupl-h1-word-spacing);
    margin: var(--graupl-h1-margin);
  }

H2

Applies the default h2 styling to an element.

css
  .text-h2 {
    font-size: var(--graupl-h2-font-size);
    font-weight: var(--graupl-h2-font-weight);
    font-style: var(--graupl-h2-font-style);
    font-variant: var(--graupl-h2-font-variant);
    color: var(--graupl-h2-color);
    font-family: var(--graupl-h2-font-family);
    line-height: var(--graupl-h2-line-height);
    letter-spacing: var(--graupl-h2-letter-spacing);
    word-spacing: var(--graupl-h2-word-spacing);
    margin: var(--graupl-h2-margin);
  }

H3

Applies the default h3 styling to an element.

css
  .text-h3 {
    font-size: var(--graupl-h3-font-size);
    font-weight: var(--graupl-h3-font-weight);
    font-style: var(--graupl-h3-font-style);
    font-variant: var(--graupl-h3-font-variant);
    color: var(--graupl-h3-color);
    font-family: var(--graupl-h3-font-family);
    line-height: var(--graupl-h3-line-height);
    letter-spacing: var(--graupl-h3-letter-spacing);
    word-spacing: var(--graupl-h3-word-spacing);
    margin: var(--graupl-h3-margin);
  }

H4

Applies the default h4 styling to an element.

css
  .text-h4 {
    font-size: var(--graupl-h4-font-size);
    font-weight: var(--graupl-h4-font-weight);
    font-style: var(--graupl-h4-font-style);
    font-variant: var(--graupl-h4-font-variant);
    color: var(--graupl-h4-color);
    font-family: var(--graupl-h4-font-family);
    line-height: var(--graupl-h4-line-height);
    letter-spacing: var(--graupl-h4-letter-spacing);
    word-spacing: var(--graupl-h4-word-spacing);
    margin: var(--graupl-h4-margin);
  }

H5

Applies the default h5 styling to an element.

css
  .text-h5 {
    font-size: var(--graupl-h5-font-size);
    font-weight: var(--graupl-h5-font-weight);
    font-style: var(--graupl-h5-font-style);
    font-variant: var(--graupl-h5-font-variant);
    color: var(--graupl-h5-color);
    font-family: var(--graupl-h5-font-family);
    line-height: var(--graupl-h5-line-height);
    letter-spacing: var(--graupl-h5-letter-spacing);
    word-spacing: var(--graupl-h5-word-spacing);
    margin: var(--graupl-h5-margin);
  }

H6

Applies the default h6 styling to an element.

css
  .text-h6 {
    font-size: var(--graupl-h6-font-size);
    font-weight: var(--graupl-h6-font-weight);
    font-style: var(--graupl-h6-font-style);
    font-variant: var(--graupl-h6-font-variant);
    color: var(--graupl-h6-color);
    font-family: var(--graupl-h6-font-family);
    line-height: var(--graupl-h6-line-height);
    letter-spacing: var(--graupl-h6-letter-spacing);
    word-spacing: var(--graupl-h6-word-spacing);
    margin: var(--graupl-h6-margin);
  }

Font Size

Class NamePropertyValue
.text-xsfont-sizevar(--graupl-font-xs)
.text-smfont-sizevar(--graupl-font-sm)
.text-basefont-sizevar(--graupl-font-base)
.text-xlfont-sizevar(--graupl-font-xl)
.text-2xlfont-sizevar(--graupl-font-2xl)
.text-3xlfont-sizevar(--graupl-font-3xl)
.text-4xlfont-sizevar(--graupl-font-4xl)
.text-5xlfont-sizevar(--graupl-font-5xl)

Font Style

Class NamePropertyValue
.font-style-normalfont-stylenormal
.font-style-italicfont-styleitalic

Font Weight

Class NamePropertyValue
.font-weight-lightfont-weight300
.font-weight-normalfont-weight400
.font-weight-boldfont-weight700

Text Transform

Class NamePropertyValue
.text-uppercasetext-transformuppercase
.text-lowercasetext-transformlowercase
.text-capitalizetext-transformcapitalize
.text-nonetext-transformnone

Customization

To customize the typography utilities, you can use the following variables.

VariableDescriptionDefault Value
$selector-baseBase selector for utility classes."."
$selector-prefixThe selector prefix for all utility classes.""
$selector-suffixThe selctor suffix for all utility classes.""
$selector-separatorThe selector separator for all utility classes.""
$use-importantAppends !important to generated utility declarations.true
$generate-base-utilitiesGenerates the base utility classes.true
$screen-awareEnables screen-aware utility variants.false
$theme-awareEnables theme-aware utility variants.false
$scheme-awareEnables scheme-aware utility variants.false
$state-awareEnables state-aware utility variants.false
$container-awareEnables container-aware utility variants.false
$screen-aware-selector-prefixPrefix to the screen-aware portion of utility selectors.""
$screen-aware-selector-suffixSuffix to the screen-aware portion of utility selectors.""
$screen-aware-selector-separatorSeparator inserted for screen-aware utility selectors."\\:"
$theme-aware-selector-prefixPrefix to the theme-aware portion of utility selectors.""
$theme-aware-selector-suffixSuffix to the theme-aware portion of utility selectors."-theme"
$theme-aware-selector-separatorSeparator inserted for theme-aware utility selectors."\\:"
$scheme-aware-selector-prefixPrefix to the scheme-aware portion of utility selectors.""
$scheme-aware-selector-suffixSuffix to the scheme-aware portion of utility selectors."-mode"
$scheme-aware-selector-separatorSeparator inserted for scheme-aware utility selectors."\\:"
$state-aware-selector-prefixPrefix to the state-aware portion of utility selectors.""
$state-aware-selector-suffixSuffix to the state-aware portion of utility selectors.""
$state-aware-selector-separatorSeparator inserted for state-aware utility selectors."\\:"
$container-aware-selector-prefixPrefix to the container-aware portion of utility selectors."cq\\:"
$container-aware-selector-suffixSuffix to the container-aware portion of utility selectors.""
$container-aware-selector-separatorSeparator inserted for container-aware utility selectors."\\:"
$utility-propertiesMap of utility properties.()
$utility-valuesMap of utility values.()
$utility-mapMap of utility property/value pairs.()

Responsive Variants

Generating responsive utility classes can be done by setting $screen-aware, $theme-aware, $scheme-aware, $state-aware, or $container-aware to true.

By default, no responsive utility classes are generated for typography.

✏️ Note

For more information on responsive variants, refer to the Responsive utility classes documentation.