GC Design System CSS Shortcuts
GC Design System Start to use Page templates overview Basic page Components overview Breadcrumbs Button Card Checkboxes Container Date input Date modified Details Error message Error summary Fieldset File uploader Footer Grid Header Heading Icon Input Language toggle Link Notice Pagination Radios Screenreader-only Search Select Side navigation Signature Stepper Text Textarea Theme and topic menu Top navigation CSS shortcuts overview Reset styles Responsive layout State Box sizing Container sizing Display Overflow Position Visibility Font Font family Font size Font style Font weight Line height Link colour Link size Link text decoration List style Text align Text colour Text overflow Text transform Word break Margin Padding Align content Align items Align self Flex Flex direction Flex grow Flex shrink Flex wrap Gap Grid columns Grid rows Justify content Justify items Justify self Order Place content Place items Place self Background colour Border colour Border radius Border style Border width Icon names Icon size Image Cursor Pointer events Transition Styles overview Design tokens Colour tokens Spacing tokens Typography tokens Contact us Get involved Find a demo

Font size

The font size class sets the font-size property. It controls how big or small text elements appear on the page.

In most cases you do not need to use this class. Body text and heading elements are styled to match GCDS by default. Use semantic HTML tags , like h1, h2 whenever possible.

Overview

CSS Shortcut class Applied style
font-size-h1
font-size: var(--gcds-font-sizes-h1);

@media only screen and (width < 48em) {   font-size: var(--gcds-font-sizes-h1-mobile); }

font-size-h2
font-size: var(--gcds-font-sizes-h2);

@media only screen and (width < 48em) {   font-size: var(--gcds-font-sizes-h2-mobile); }

font-size-h3
font-size: var(--gcds-font-sizes-h3);

@media only screen and (width < 48em) {   font-size: var(--gcds-font-sizes-h3-mobile); }

font-size-h4
font-size: var(--gcds-font-sizes-h4);

@media only screen and (width < 48em) {   font-size: var(--gcds-font-sizes-h4-mobile); }

font-size-h5
font-size: var(--gcds-font-sizes-h5);

@media only screen and (width < 48em) {   font-size: var(--gcds-font-sizes-h5-mobile); }

font-size-h6
font-size: var(--gcds-font-sizes-h6);

@media only screen and (width < 48em) {   font-size: var(--gcds-font-sizes-h6-mobile); }

font-size-text
font-size: var(--gcds-font-sizes-text);

@media only screen and (width < 48em) {   font-size: var(--gcds-font-sizes-text-mobile); }

font-size-text-small
font-size: var(--gcds-font-sizes-text-small);

@media only screen and (width < 48em) {   font-size: var(--gcds-font-sizes-text-small-mobile); }

Examples

H1
font-size-h1

This element uses the font size intended for an H1.

<p class="font-size-h1">
  This element uses the font size intended for an H1.
</p>

H2
font-size-h2

This element uses the font size intended for an H2.

<p class="font-size-h2">
  This element uses the font size intended for an H2.
</p>

H3
font-size-h3

This element uses the font size intended for an H3.

<p class="font-size-h3">
  This element uses the font size intended for an H3.
</p>

H4
font-size-h4

This element uses the font size intended for an H4.

<p class="font-size-h4">
  This element uses the font size intended for an H4.
</p>

H5
font-size-h5

This element uses the font size intended for an H5.

<p class="font-size-h5">
  This element uses the font size intended for an H5.
</p>

H6
font-size-h6

This element uses the font size intended for an H6.

<p class="font-size-h6">
  This element uses the font size intended for an H6.
</p>

Text
font-size-text

This element uses the font size intended for regular text.

<p class="font-size-text">
  This element uses the font size intended for regular text.
</p>

Small text
font-text-small

This element uses the font size intended for small text.

<p class="font-text-small">
  This element uses the font size intended for small text.
</p>

2026-02-12