Typography

Foundations in type

Modular Scale

Pollen provides a robust modular typography scale to encourage consistent typography sizing across an interface. Sizes are set in rem units to support proper font scaling, and assume a 16px root font-size.

.heading {
  font-size: var(--scale-4);
}

Fluid Modular Scale

In addition to the standard modular typographic scale above, Pollen also comes with a fluid scale that tweens between steps on the scale as screen width changes. Its built with Pollen's own fluid utility, which generates complex CSS clamp() functions based on screen width bounds.

Each fluid font size resizes between a min and max size, starting at mobile screen sizes (480px) and ending at normal desktop screen sizes (1280px).

.heading {
  font-size: var(--scale-fluid-5);
}

Font Families

Base font stacks as better alternatives to browser defaults, designed for rapid prototyping and to be overridden as your project grows.

body {
  font-family: var(--font-sans);
}

Font Weights

Consistent font weights across an interface

.heading {
  font-weight: var(--weight-bold)
}

Line Height

Encourage consistent line heights across an interface, applied as unitless values to scale with font size.

body {
  line-height: var(--line-md);
}

Letter Spacing

Encourage consistent letter spacing across an interface, applied as em units relative to the text's size

.uppercase {
  letter-spacing: var(--letter-xs);
}

Prose Width

Max-widths optimised for legibility of large blocks of text, based on the font and font-size of content.

article {
  max-width: var(--prose-normal);
  margin: 0 auto;
}

Last updated