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

Icon size

The icon size class sets the font-size and line-height properties of icons. It controls the size of gcds-icons.

Overview

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

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

icon-h2
font-size: var(--gcds-font-sizes-h2);
line-height: var(--gcds-line-heights-h2);

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

icon-h3
font-size: var(--gcds-font-sizes-h3);
line-height: var(--gcds-line-heights-h3);

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

icon-h4
font-size: var(--gcds-font-sizes-h4);
line-height: var(--gcds-line-heights-h4);

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

icon-h5
font-size: var(--gcds-font-sizes-h5);
line-height: var(--gcds-line-heights-h5);

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

icon-h6
font-size: var(--gcds-font-sizes-h6);
line-height: var(--gcds-line-heights-h6);

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

icon-text
font-size: var(--gcds-font-sizes-text);
line-height: var(--gcds-line-heights-text);

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

icon-text-small
font-size: var(--gcds-font-sizes-text-small);
line-height: var(--gcds-line-heights-text-small);

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

icon-inherit
font-size: inherit;
line-height: inherit;

@media only screen and (width < 48em) {   font-size: inherit;   line-height: inherit; }

Examples

H1
icon-h1

This icon matches the H1 font size and line height.

<p>
  <span class="gcds-icon-info-circle icon-h1"></span> This icon matches the H1 font size and line height.
</p>

H2
icon-h2

This icon matches the H2 font size and line height.

<p>
  <span class="gcds-icon-info-circle icon-h2"></span> This icon matches the H2 font size and line height.
</p>

H3
icon-h3

This icon matches the H3 font size and line height.

<p>
  <span class="gcds-icon-info-circle icon-h3"></span> This icon matches the H3 font size and line height.
</p>

H4
icon-h4

This icon matches the H4 font size and line height.

<p>
  <span class="gcds-icon-info-circle icon-h4"></span> This icon matches the H4 font size and line height.
</p>

H5
icon-h5

This icon matches the H5 font size and line height.

<p>
  <span class="gcds-icon-info-circle icon-h5"></span> This icon matches the H5 font size and line height.
</p>

H6
icon-h6

This icon matches the H6 font size and line height.

<p>
  <span class="gcds-icon-info-circle icon-h6"></span> This icon matches the H6 font size and line height.
</p>

Text
icon-text

This icon matches the text font size and line height.

<p>
  <span class="gcds-icon-info-circle icon-text"></span> This icon matches the text font size and line height.
</p>

Small text
icon-small-text

This icon matches the small text font size and line height.

<p>
  <span class="gcds-icon-info-circle icon-small-text"></span> This icon matches the small text font size and line height.
</p>

Inherit
icon-inherit

This icon inherits the small text font size and line height from the parent.

<p class="font-text-small">
  <span class="gcds-icon-info-circle icon-inherit"></span> This icon inherits the small text font size and line height from the parent.
</p>

Conditional styling Apply this style to specific screen sizes Use a responsive layout prefix to apply this class only to a specified screen size. The available breakpoints are:

  • xs: > 480px
  • sm: > 640px
  • md: > 768px
  • lg: > 1024px
  • xl: > 1280px
  
<div class="xs:icon-text ...">
  ...
</div>
  

Learn more about the responsive layout prefix.

2025-10-01