#StandWithUkraine

Typography

Open in Storybook Open in Figma

This page describes basic font and text components. See the Typography examples for examples on how to combine them.

The typography and spacing rules given here cover the basic appearance in George. Individual components (e.g. FunctionCard) might overrule some of these rules in certain cases. In such a case, those exceptions are described in the respective component pages of GDS.

Headlines

Headlines are set using <h1> to <h4> elements. Not all headlines are allowed in every context:

  • There is only one <h1> per page, serving as page title.
  • Exception to the initial rule: An open Modal counts as a page within a page (that traps the user inside of it), in this case the Modal title adds another <h1>.
  • Outside of George Store, <h1> on grey background have become obsolete, as the page title will be set in StripeHeader and Modal.
  • Two headlines can never follow each other directly.
  • <h2> and <h3> on grey background are used to structure main content.
  • <h2>, <h3>, and <h4> are used in cards for headlines. They all look the same. The actual level of the headline to use depends on the last headline used outside the card so that in pure text mode it is a continuation of the outer headline level.
Loading demo…
Loading demo…
Rules For Developers
  • DEPRECATED There used to be a line after <h1>, but it is no longer rendered. As a result, suppressing it with .g-no-line is not needed anymore. For the record, legacy <h1> that are followed by <hr> to mimick a line should be a thing of the past by now.
  • Apply .g-first to a headline if you want it to have no top margin – if it’s the first element on grey background.
  • There is no need to apply .g-first inside cards, even if the headline is the first element.
Rules For Designers
  • Headlines for all levels (<h1>..<h6>) use font-weight bold 700.
  • On grey background, …
    • <h1> has a font-size of 24px with 30px line-height,
    • <h2> has a font-size of 22px with 28px line-height,
    • <h3> has a font-size of 18px with 24px line-height,
    • <h4> has a font-size of 18px with 20px line-height,
    • <h5> and <h6> have a font-size of 16px with 20px line-height.
  • Inside cards, …
    • <h2>..<h6> inside cards all have a font-size of 18px with 24px line-height.
  • DEPRECATED <h1> used to be followed by 16px spacing, a line 1px / $color-gray-200 (#e4eaf0), and another 16px spacing to the following content.
  • <h2>..<h3> have 20px spacing to the following content.

Paragraphs

Regular text is set using <p> elements. Minor/smaller text is set by adding .g-small. Micro text is set by adding .g-micro. Faded text is set by adding .g-faded.

Loading demo…
Loading demo…

HINT Do not use unstyled text, always use <p> elements.

HINT As .g-small also adjusts the line height, it should be used on block-level elements. <small> elements may be used in addition inside any paragraph, and especially in those that have .g-small applied, to mark fine print semantically. But use of these elements does not result in any visual changes (e.g. no smaller font), only .g-small does.

HINT Avoid <br/> and convert them to <p> instead.

Rules For Designers
  • Regular paragraphs use 16px font-size with 24px line-height.
  • Small paragraphs use 14px font-size with 21px line-height.
  • Text colour on both white and grey background is $color-blue-400 (#0a285c).
  • Faded text colour on both white and grey background is $color-gray-400 (#537091).

Emphasis

George uses two kinds of emphasized text: bold and ‘quoted’. Bold is used if whole sentences are important. Quotes are used, if single words or short phrases within a sentence need to be emphasized:

Loading demo…
Rules For Copywriters
  • When using quote text, the correct language-specific opening and closing quotes have to be used.
Rules For Designers
  • Emphasised text elements inside components (e.g. date, title, amount in transactions, hyperlinks in paragraph text) use font-weight semibold 600.
  • Bold text is not allowed in small paragraphs, but hyperlinks are.

Ordinary in-line hyperlinks are set using <a> elements within <p> elements.

Loading demo…
Rules For Designers
  • Hyperlinks are presented in semibold 600 / $color-blue-300 (#135ee2).
  • Hyperlinks are underlined on hover and not otherwise.
  • Hyperlinks and Buttons have a visually similar focus state.

Lists

George lists come in different flavours.

Default lists

Loading demo…

Plain lists

Plain (i.e. unstyled) lists have no visual indication that they are lists at all, they look identical to a sequence of paragraphs.

Loading demo…

You can add the also available .g-ul-compact modifier, which eliminates spacing between list items.

Loading demo…

Bullet lists with checkmarks

George Store lists feature check-marks as bullet points.

Loading demo…

Ordered lists

Loading demo…

Unsorted lists with different icons

Loading demo…

Labeled lists

See LabeledList component.

Rules For Designers
  • Lists use the same font / size / weight as paragraphs.
  • Except when adding .g-ul-compact, lists use the vertical spacing as paragraphs.
  • A combination of .g-ul-checkmark and .g-ul-compact is technically supported but not encouraged.
  • Bullets use inline SVGs / 16px / $color-blue-400 (#0a285c).

Separators

Horizontal rulers / separators (when not part of a <h1>) are set by using the <hr/> tag.

Loading demo…
Rules For Designers
  • Separators have a height of 1px and full width.
  • Separators are $color-gray-100 (#eef0f4).

Variations

Variations for the aforementioned typographic building blocks exist. So when used under the following specific circumstances, you may encounter certain areas of markup with an alternate look&feel.

Tabular numbers

If you need alignment for numeric values, you can add the .g-tabular modifier.

HINT In the example below, the dates and amounts on the left have the modifier applied; on the right without modifier for comparison.

Loading demo…

Sections containing legal text can be marked up with .g-small. Legal text is presented in smaller font size. For more information check out the legal text example in our Typography examples.

Rules For Designers
  • Legal text uses a smaller font, which is then inherited by
    • paragraphs and lists,
    • but not headlines.

Miscellaneous

Selected text

George uses native colours provided by the operating system (or web browser) for selected text.

Loading demo…

Text spacing

Due to rem rounding errors, spacings are usually +/-1px correct.

Loading demo…
Rules For Designers
  • Headlines, except the first one in a container, are preceded by 40px spacing.
  • Paragraphs are preceded by 20px spacing.
  • Lists and list items use the same vertical spacing as paragraphs.
  • Separators keep 16px spacing above/below to another element (this overrules other spacing rules).