Cloudflare LogoNavigate Back
Cloudflare Style
Cloudflare Style is in Alpha and is a work-in-progress. Expect changes. Contact DESSYS with any questions.
Primitives

Typography

Guidelines for using typography as a tool for effective communication.


Type Scale

Don‘t compose without a scale Robert Bringhurst - The Elements of Typographic Style

Our typescale is a modest set of distinct and related intervals optimized for usage on the web. Adjust font-sizes across breakpoints to maximize readability for each device size and context.

Using a consistent typographic scale and a limited set of spacing and sizing values is an effective way to maximize visual harmony with limited effort and maintenance. By encoding these constraints in our theme file and enabling access through Styled System, we can speed up our velocity while making the visual design of our applications inherently more consistent.

Scale

0123456789
AaAaAaAaAaAaAaAaAaAa
10px12px14px16px20px24px32px48px64px80px

Annotated Scale

10pxtheme.fontSizes[0]fontSize={0}

Used for labels in analytics. Should be avoided for UI copy.

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()

12pxtheme.fontSizes[1]fontSize={1}

Used in progress stepper, footers, sidebars, and more. Can be necessary for high information density interfaces, but should be avoided for important copy.

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()

14pxtheme.fontSizes[2]fontSize={2}

Form labels, help text, inline links, footer and sidebar copy.

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()

16pxtheme.fontSizes[3]fontSize={3}

Default body copy size. Often used for links.

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()

20pxtheme.fontSizes[4]fontSize={4}

Card and promo card titles. Generally set to 500-700 font weight.

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()

24pxtheme.fontSizes[5]fontSize={5}

Card, promo card, and form titles. Generally set to 500-700 font weight. Can be used on mobile, tablet, and desktop.

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()

32pxtheme.fontSizes[6]fontSize={6}

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()

48pxtheme.fontSizes[7]fontSize={7}

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()

64pxtheme.fontSizes[8]fontSize={8}

Marketing titles and large numbers. Line height should be set to 1 or 1.25. Font-weights 400-700 are okay to use. Can be used on tablet and desktop.

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()

80pxtheme.fontSizes[9]fontSize={9}

Marketing titles and large numbers. Line height should be set to 1 or 1.25. Font-weights 400-700 are okay to use. Should be used for desktop only.

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()

Font weights

AaAaAaAa
Cache rules everything around me. The network is the computer®.Cache rules everything around me. The network is the computer®.Cache rules everything around me. The network is the computer®.Cache rules everything around me. The network is the computer®.
300400600700

Line heights

Line-height affects how easy it is to read a piece of text. Set line-height to 1 when the text will never wrap and you have appropriate white space around the text to help with alignment ui elements. Titles set at larger font-sizes can use line-heights of 1.25. Body copy should always be set to 1.5. This helps readability while also keeping us on a vertical grid the majority of the time.

Default line-height

Most browsers default to a line-height of ~1.1-1.2. As noted, according to accessibility guidelines, this isn‘t enough for some people, and leads to difficulting tracking text.

14px / initial

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

16px / initial

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

20px / initial

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore.

24px / initial

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.

Titles (1.25)

Titles often have a line-height set between 1.2-1.3. For titles we use 1.25 to ensure all of our line-heights will compute as integers. Note that titles exceeding 3 lines in length should often be set to 1.5.

20px / 1.25

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur

24px / 1.25

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur

32px / 1.25

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur

Body copy (1.5)

Common typographic standards recommend body copy be set between 1.4 and 1.6. Our lower boundary of 1.5 from the accessibility guidelines to falls perfectly in the middle of this range. The benefits of using 1.5 instead of an alternative value between 1.4 1nd 1.6 ensures our vertical rhythm falls on integer pixel values, and will often fall on a number divisible by 8.

14px / 1.5

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

16px / 1.5

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

20px / 1.5

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

  • ↑ Top
  • Type Scale
  • Scale
  • Font weights
  • Line heights
  • Default line-height
  • Titles (1.25)
  • Body copy (1.5)

  • LinkedIn
  • Facebook
  • Twitter
  • GitHub
  • YouTube

Cloudflare LogoNavigate back
  • © 2021 Cloudflare, Inc.
  • About Cloudflare
  • Careers
  • Terms of Use
  • Disclosure
  • Trademark