Well-defined typography styles in combination with a design system layout grid will create structured content. Limiting font-families, a tight type scale, and content limits will keep it tight.
By default, Ray will assign css attributes directly to HTML tags like h1–h6. If that kind of behavior is undesired, assign the $ray-assign-typography-styles-natively
sass variable to false.
Headings
Ray includes typography styles for <h1>
through <h6>
classes, with .ray-text--h*
.
The classes are not tied to the semantic html tags, so for example you could use a .ray-text--h3
on an <h1>
, however this is an indicator that the information hierarchy of your page may need some reconsideration.
Headings include some margin on them. If you wish to use a heading without including the margin you can assign the class to a span
, like below:
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Displays
Native heading elements (h1-h6) are designed for general-purpose use throughout the content. However, if a more distinguished and intentional headline is needed, consider using a display
headline.
Display 1
Display 2
Body Copy
Running Text
This utility is useful for long-form content, especially content that is dynamically generated from markdown. It will directly style h1
–h6
, p
, blockquote
, ul
, and ol
tags. This will generally only be needed when $ray-assign-typography-styles-natively
is set to false.
Title
Lorem ipsum dolor sit amet consectetur adipisicing elit. Vel quia magnam at eligendi, incidunt amet eaque distinctio veniam atque, beatae laudantium vitae autem molestias repellendus exercitationem in inventore accusamus eveniet.
Title 2
- Item the
first
. - Item the second.
- Item the third.
Title 3
Utilities
Blockquote
Add a <footer class="ray-blockquote__footer">
to identify a source.
What works good is better than what looks good, because what works good lasts.
Lists
- Item one
- Item two
- Item three
-
Item four
- and a one
- and a two
- and a three
- Item five
Links
Font Family
Limiting font-families, a tight type scale, and content limits will keep it tight.
Apercu
The design system uses Apercu as the main typeface. It has been the typeface of choice for WeWork for the past two years and has proved to be consistent with our brand style and execution.
Font weights will be restricted to regular and bold.
Apercu Mono
A mono-space font is useful for differentiating between general body copy and specific data or section headers. We use Apercu-Mono to define the section headers and specific numerical data.
A mono-spaced font only has a single weight.
Standard Text Colors
Text colors used will be broken out by use case and tint (light, medium, dark). Restricting the colors used will help with consistency.
Dark
$ray-color-text-dark
– The primary text color, this should generally be used by default for most elements and body text.
Medium
$ray-color-text-medium
– A secondary text color is needed for the system in places like labels on inputs.
Light
$ray-color-text-light
– A tertiary text color is need for the system to convey placeholder for example.
Full Scale
Class | Font rem | Line Height | Demo |
---|---|---|---|
ray-text--display-1 | NaNrem | Hello world | |
ray-text--display-2 | NaNrem | Hello world | |
ray-text--h1 | NaNrem | Hello world | |
ray-text--h2 | NaNrem | Hello world | |
ray-text--h3 | NaNrem | Hello world | |
ray-text--h4 | NaNrem | Hello world | |
ray-text--h5 | NaNrem | Hello world | |
ray-text--h6 | NaNrem | Hello world | |
ray-text--body | NaNrem | Hello world | |
ray-text--body-large | NaNrem | Hello world | |
ray-text--body-small | NaNrem | Hello world | |
ray-text--body-x-small | NaNrem | Hello world |
Typography Mixins
These mixins can be useful for responsively assigning typography styles.
.my-copy { @include ray-body; @include ray-breakpoint(tablet) { @include ray-body-large; } }
All available typography mixins
@include ray-display-1;
@include ray-display-2;
@include ray-h1;
@include ray-h2;
@include ray-h3;
@include ray-h4;
@include ray-h5;
@include ray-h6;
@include ray-body;
@include ray-body-large;
@include ray-body-small;
@include ray-body-x-small;