Typography
Stacks provides atomic classes to override default styling of typography. Change typographic weights, styles, and alignment with these atomic styles.
These styles should only be used as overrides. They shouldn’t replace standard semantic uses of strong
or em
tags.
Class | Output | Definition |
---|---|---|
.fw-normal |
font-weight: normal; |
Normal font weight. Maps to 400. |
.fw-bold |
font-weight: bold; |
Bold font weight. Maps to 700. |
.fs-normal |
font-style: normal; |
Selects the normal font within the font-family. |
.fs-italic |
font-style: italic; |
Selects the italic font within the font-family. |
.tt-capitalize |
text-transform: capitalize; |
The first character in each word is capitalized regardless of markup. |
.tt-lowercase |
text-transform: lowercase; |
All characters are lowercase regardless of markup. |
.tt-uppercase |
text-transform: uppercase; |
All characters are uppercase regardless of markup. |
.tt-none |
text-transform: none; |
Characters in a string remain unchanged. |
.tt-unset |
text-transform: unset; |
Text-transform is unset entirely. |
.td-underline |
text-decoration: underline; |
Text renders with an underline. |
.td-none |
text-decoration: none; |
Text renders without an underline. |
unset
property is a combination property that resets a property to its inherited value. It behaves like the inherit
and the initial
keywords, but it properly selects the right value for you. Unfortunately, unset
is not fully supported in Internet Explorer. Because of this all unset
values have the correct inherit
or initial
value applied.
Class | Output | Definition | Responsive? |
---|---|---|---|
.ta-left |
text-align: left; |
Inline contents are aligned to the left edge. |
|
.ta-center |
text-align: center; |
Inline contents are aligned to the center. |
|
.ta-right |
text-align: right; |
Inline contents are aligned to the right edge. |
|
.ta-justify |
text-align: justify; |
Inline contents are justified. Text should be spaced to line up its left and right edges to the left and right edges, except for the last line. |
|
.ws-normal |
white-space: normal; |
Lines are broken as necessary to fill the parent. |
|
.ws-nowrap |
white-space: nowrap; |
Text wrapping is disabled. |
|
.ws-pre |
white-space: pre; |
Whitespace is preserved but text won’t wrap. |
|
.ws-pre-wrap |
white-space: pre-wrap; |
Whitespace is preserved but text will wrap. New lines are preserved. |
|
.ws-pre-line |
white-space: pre-line; |
Whitespace is preserved but text will wrap. New lines are collapsed. |
|
.ow-normal |
word-break: normal; |
Restores overflow wrapping behavior. |
|
.ow-break-word |
overflow-wrap: break-word; |
Breaks a word to a new line only if the entire word cannot be placed on its own line without overflowing. |
|
.ow-inherit |
overflow-wrap: inherit; |
Inherits the parent value. |
|
.ow-intial |
overflow-wrap: intial; |
Restores the value to the initial value set on the body. |
|
.ow-unset |
overflow-wrap: unset; |
Unsets any inherited behavior. Does not work in IE. |
|
.ww-break-word |
word-wrap: break-word; |
Deprecated, please use the equivalent ow-break-word instead. Specifies if a browser should insert line breaks within words to prevent text from overflowing its content box. |
|
.wb-normal |
word-break: normal; |
Restores word break behavior. |
|
.wb-break-all |
word-break: break-all; |
To prevent copy from overflowing its box, breaks should occur between any two characters (excluding Chinese, Japanese, and Korean text) |
|
.wb-keep-all |
word-break: keep-all; |
Removes word breaks for Chinese, Japanese, and Korean text. All other text behavior is the same as normal. |
|
.wb-inherit |
word-break: inherit; |
Inherits the parent value. |
|
.wb-intial |
word-break: intial; |
Restores the value to the initial value set on the body. |
|
.wb-unset |
word-break: unset; |
Unsets any inherited behavior. Does not work in IE. |
|
.truncate |
max-width: 100%; |
Text is cropped to the width of its parent with an ellipsis. |
unset
property is a combination property that resets a property to its inherited value. It behaves like the inherit
and the initial
keywords, but it properly selects the right value for you. Unfortunately, unset
is not fully supported in Internet Explorer. Because of this all unset
values have the correct inherit
or initial
value applied.
Text Align: Left
Text Align: Center
Text Align: Right
Text Align: Justify — 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. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Text Align: Unset
White-space: Normal
White-space: Nowrap
White-space: Pre
White-space: Pre-wrap
White-space: Pre-line
White-space: Unset
Word Wrap: Break word
Sans Serif
Serif
Monospace
Fonts larger than .fs-body1
are reduced in size at the smallest responsive breakpoint. .fs-body1
or smaller remain fixed at their initial pixel values.
Class | Size | Responsive Size |
---|---|---|
.fs-fine |
11px |
11px |
.fs-caption |
12px |
12px |
.fs-body1 |
13px |
13px |
.fs-body2 |
15px |
14.3px |
.fs-body3 |
17px |
15.4px |
.fs-subheading |
19px |
17.6px |
.fs-title |
21px |
19.8px |
.fs-headline1 |
27px |
22px |
.fs-headline2 |
34px |
25.3px |
.fs-display1 |
43px |
28.6px |
.fs-display2 |
55px |
33px |
.fs-display3 |
69px |
36.3px |
.fs-display4 |
99px |
41.8px |
.fs-category |
12px |
12px |
Category titles help break content into digestible chunks, but are visually smaller than a traditional headline. They are meta descriptions of a content block. To further visually separate the content block from surrounding items, you can add a .has-border
class.
Line Height XS: This sets the line-height
value to 1
. 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.
Line Height SM: This sets the line-height
value to 1.13
. 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.
Line Height MD: This sets the line-height
value to 1.26
. 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.
Line Height LG: This sets the line-height
value to 1.4
. 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.
Line Height XL: This sets the line-height
value to 1.53
. 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.
Line Height XXL: This sets the line-height
value to 1.67
. 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.
Color: Light @black-500
Color: Medium @black-700
Color: Default @black-800
Color: Dark @black-900
- List item 1
- List item 2
- List item 3
- List item 4
- List item 5
- List item 1
- List item 2
- List item 3
- List item 4
- List item 5
- List item 1
- List item 2
- List item 3
- List item 4
- List item 5
- List item 1
- List item 2
- List item 3
- List item 4
- List item 5
- List item 1
- List item 2
- List item 3
- List item 4
- List item 5
- List item 1
- List item 2
- List item 3
- List item 4
- List item 5
- List item 1
- List item 2
- List item 3
- List item 4
- List item 5