TypographyFont Size

Font Size

Controls the font size of an element.

Widely available

This feature is well established and works across many devices and browser versions.

Chrome
Edge
Firefox
Safari

fs-xsfont-size: 0.75rem;
fs-smfont-size: 0.875rem;
fs-mdfont-size: 1rem;
fs-lgfont-size: 1.125rem;
fs-xlfont-size: 1.25rem;
fs-xxlfont-size: 1.5rem;
fs-3xlfont-size: 1.875rem;
fs-4xlfont-size: 2.25rem;
fs-5xlfont-size: 3rem;
fs-6xlfont-size: 3.75rem;
fs-7xlfont-size: 4.5rem;
fs-8xlfont-size: 6rem;
fs-9xlfont-size: 8rem;

Extra Small

This size is typically used for smaller text elements.

Aa

<p class="fs-xs ta-c c-slate">Aa</p>

Small

This size is often used for slightly larger text elements.

Aa

<p class="fs-sm ta-c c-slate">Aa</p>

Medium

Initial value

This is the standard size for body text.

Aa

<p class="fs-md ta-c c-slate">Aa</p>

Large

This size is often used for prominent headings.

Aa

<p class="fs-lg ta-c c-slate">Aa</p>

Extra Large

This size is typically used for major headings or titles.

Aa

<p class="fs-xl ta-c c-slate">Aa</p>

XXL

This size is often used for very prominent headings.

Aa

<p class="fs-xxl ta-c c-slate">Aa</p>

3XL

This size is typically used for the largest headings.

Aa

<p class="fs-3xl ta-c c-slate">Aa</p>

4XL

This size is often used for the most prominent headings.

Aa

<p class="fs-4xl ta-c c-slate">Aa</p>

5XL

This size is typically used for the most prominent text elements.

Aa

<p class="fs-5xl ta-c c-slate">Aa</p>

6XL

This size is often used for the most prominent text elements.

Aa

<p class="fs-6xl ta-c c-slate">Aa</p>

7XL

This size is typically used for the largest display text.

Aa

<p class="fs-7xl ta-c c-slate">Aa</p>

8XL

This size is typically used for the largest display text.

Aa

<p class="fs-8xl ta-c c-slate">Aa</p>

9XL

This size is typically used for the largest display text.

Aa

<p class="fs-9xl ta-c c-slate">Aa</p>

Using utility variants

Learn how to override existing utilities based on the user's screen size or other factors, such as hover states.

Responsive design

Target different screen sizes by adding breakpoint prefixes. Styles apply from the specified breakpoint and up.

Target specific viewport sizes with breakpoint prefixes

sm:fs-[value]
Small≥640px
md:fs-[value]
Medium≥768px
lg:fs-[value]
Large≥1024px
xxl:fs-[value]
Extra Large≥1536px

Hover state variant

Apply styles conditionally when users hover over an element using the h: prefix.

Add the h: prefix to apply styles only when the user hovers over the element.

Syntax:h:fs-[value]