Text
The text utility classes help manage the font properties and text alignment of an element. These classes allow you to control the text properties easily.
Font Family
Class | Description |
---|---|
ff:sans | font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol' |
ff:serif | font-family: Times, 'Times New Roman', Georgia, serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol' |
ff:monospace | font-family: 'Lucida Console', Courier, monospace, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol' |
ff:cursive | font-family: cursive |
ff:fantasy | font-family: fantasy |
ff:emoji | font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', emoji |
ff:math | font-family: math |
ff:fangsong | font-family: fangsong |
ff:sans
The .ff:sans
class sets the font family to a sans-serif typeface.
<div class="ff:sans">
Sans-Serif Font
</div>
ff:serif
The .ff:serif
class sets the font family to a serif typeface.
<div class="ff:serif">
Serif Font
</div>
ff:monospace
The .ff:monospace
class sets the font family to a monospace typeface.
<div class="ff:monospace">
Monospace Font
</div>
ff:cursive
The .ff:cursive
class sets the font family to a cursive typeface.
<div class="ff:cursive">
Cursive Font
</div>
ff:fantasy
The .ff:fantasy
class sets the font family to a fantasy typeface.
<div class="ff:fantasy">
Fantasy Font
</div>
ff:emoji
The .ff:emoji
class sets the font family to an emoji typeface.
<div class="ff:emoji">
Emoji Font
</div>
ff:math
The .ff:math
class sets the font family to a math typeface.
<div class="ff:math">
Math Font
</div>
ff:fangsong
The .ff:fangsong
class sets the font family to a fangsong typeface.
<div class="ff:fangsong">
Fangsong Font
</div>
Font Weight
Class | Description |
---|---|
fw | font-weight: var(--sf-fw) 400 |
fw:i | font-weight: inherit |
fw:b | font-weight: var(--sf-fw-bold) 600 |
fw:s | font-weight: var(--sf-fw-small) 300 |
<div class="fw">
Font Weight 400
</div>
<div class="fw:i">
Font Weight inherit
</div>
<div class="fw:b">
Font Weight bold (600)
</div>
<div class="fw:s">
Font Weight small (300)
</div>
Class | Description |
---|---|
fw:1 | font-weight: 100 |
fw:2 | font-weight: 200 |
fw:3 | font-weight: 300 |
fw:4 | font-weight: 400 |
fw:5 | font-weight: 500 |
fw:6 | font-weight: 600 |
fw:7 | font-weight: 700 |
fw:8 | font-weight: 800 |
fw:9 | font-weight: 900 |
fw:1 to fw:9
These classes set the font weight from 100 to 900.
<div class="fw:1">
Font Weight 100
</div>
<div class="fw:2">
Font Weight 200
</div>
<div class="fw:3">
Font Weight 300
</div>
<div class="fw:4">
Font Weight 400
</div>
<div class="fw:5">
Font Weight 500
</div>
<div class="fw:6">
Font Weight 600
</div>
<div class="fw:7">
Font Weight 700
</div>
<div class="fw:8">
Font Weight 800
</div>
<div class="fw:9">
Font Weight 900
</div>
Named Font Weight Classes
These classes set the font weight using named values.
INFO
These classes are static / not change
Class | Description |
---|---|
fw:thin | font-weight: 100 |
fw:extra-light / fw:ultra-light | font-weight: 200 |
fw:light | font-weight: 300 |
fw:normal | font-weight: 400 |
fw:medium | font-weight: 500 |
fw:semi-bold / fw:demi-bold | font-weight: 600 |
fw:bold | font-weight: 700 |
fw:extra-bold / fw:ultra-bold | font-weight: 800 |
fw:black / fw:heavy | font-weight: 900 |
<div class="fw:thin">
Thin
</div>
<div class="fw:extra-light">
Extra-light
</div>
<div class="fw:light">
Light
</div>
<div class="fw:normal">
Normal
</div>
<div class="fw:medium">
Medium
</div>
<div class="fw:semi-bold">
Semi-Bold
</div>
<div class="fw:bold">
Bold
</div>
<div class="fw:extra-bold">
Extra-Bold
</div>
<div class="fw:black">
Black
</div>
Font Size
Class | Description |
---|---|
fz:h1 | font-size: var(--sf-h1); |
fz:h2 | font-size: var(--sf-h2); |
fz:h3 | font-size: var(--sf-h3); |
fz:h4 | font-size: var(--sf-h4); |
fz:h5 | font-size: var(--sf-h5); |
fz:h6 | font-size: var(--sf-h6); |
fz:i | font-size: inherit; |
fz | font-size: var(--sf-fz); |
fz:s | font-size: var(--sf-fz-small); |
<div class="fz:h1">
H1
</div>
<div class="fz:h2">
H2
</div>
<div class="fz:h3">
H3
</div>
<div class="fz:h4">
H4
</div>
<div class="fz:h5">
H5
</div>
<div class="fz:h6">
H6
</div>
<div class="fz:i">
Inherit
</div>
<div class="fz">
Normal
</div>
<div class="fz:s">
Small
</div>
Text Align
Class | Description |
---|---|
ta:c | text-align: center |
ta:e | text-align: end |
ta:j | text-align: justify |
ta:l | text-align: left |
ta:r | text-align: right |
ta:s | text-align: start |
<div class="ta:c">
center
</div>
<div class="ta:e">
end
</div>
<div class="ta:j">
justify
</div>
<div class="ta:l">
left
</div>
<div class="ta:r">
right
</div>
<div class="ta:s">
start
</div>
White-space
Class | Description |
---|---|
whs:n | white-space: normal |
whs:nw | white-space: nowrap |
whs:p | white-space: pre |
whs:pl | white-space: pre-line |
whs:pw | white-space: pre-wrap |
<div class="whs:n">
normal
</div>
<div class="whs:nw">
nowrap
</div>
<div class="whs:p">
pre
</div>
<div class="whs:pl">
pre-line
</div>
<div class="whs:pw">
pre-wrap
</div>
Line-height
Class | Description |
---|---|
lh |
line-height: var(--sf-lh) 0.8 tags: All |
lh:1 |
line-height: 1 tags: None |
lh:i |
line-height: inherit tags: None |
lh:n |
line-height: normal tags: None |
lh:t |
line-height: var(--sf-lh-txt) 1.5
tags: address , blockquote , dd ,
dt ,
li ,
p |
<div class="lh">
line-height
</div>
<div class="lh:1">
line-height: 1
</div>
<div class="lh:i">
line-height (inherit)
</div>
<div class="lh:n">
line-height (normal)
</div>
<div class="lh:t">
line-height (text)
</div>