Foundation
Typography
Typography
The Wojo Framework typography system is a set of CSS utility classes defined in
wf-typography.css
. It covers a 13-step fluid type scale using
clamp()
, font family utilities, seven weight steps, text color classes for every brand and semantic token, and a full set of alignment, transform, decoration, line-height, letter-spacing, whitespace, and overflow utilities.
Headings
Native heading elements
h1
-
h6
are set in Poppins via
--font-headings
and use fluid
clamp()
sizes so they scale smoothly between viewport breakpoints without breakpoint-specific overrides. Override any size token on
:root
to adjust the entire heading scale.
Heading 1
clamp(2.5rem, 5vw+1rem, 4.5rem)
Heading 2
clamp(2rem, 3.5vw+1rem,
3.75rem)
Heading 3
clamp(1.75rem, 2vw+1rem,2.75rem)
Heading 4
clamp(1.5rem, 1.5vw+1rem,
2rem)
Heading 5
clamp(1.25rem, 1vw+1rem,
1.5rem)
Heading 6
clamp(1.1rem, 0.5vw+1rem,
1.25rem)
CSS
Copy
/* Override heading sizes on :root */
:root {
--h1-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
--h2-size: clamp(2rem, 3.5vw + 1rem, 3.75rem);
--h3-size: clamp(1.75rem, 2vw + 1rem, 2.75rem);
--h4-size: clamp(1.5rem, 1.5vw + 1rem, 2rem);
--h5-size: clamp(1.25rem, 1vw + 1rem, 1.5rem);
--h6-size: clamp(1.1rem, 0.5vw + 1rem, 1.25rem);
}
Type Scale
A 13-step fluid scale from
wf-text-xxs
to
wf-text-9xl
. Every step uses
clamp()
with a fluid middle value so size grows proportionally with the viewport between the min and max endpoints.
The quick brown fox
wf-text-xxs
≈ 0.625rem
The quick brown fox
wf-text-xs
≈ 0.75rem
The quick brown fox
wf-text-sm
≈ 0.875rem
The quick brown fox
wf-text-base
≈ 1rem
The quick brown fox
wf-text-md
≈ 1.125rem
The quick brown fox
wf-text-lg
≈ 1.25rem
The quick brown fox
wf-text-xl
≈ 1.5rem
The quick brown fox
wf-text-2xl
≈ 1.75rem
The quick brown fox
wf-text-3xl
≈ 2rem
The quick brown fox
wf-text-4xl
≈ 2.5rem
The Quick brown fox
wf-text-5xl
≈ 3rem
The Quick brown
wf-text-6xl
≈ 3.5rem
The Quick brown
wf-text-7xl
≈ 4rem
HTML
Copy
<span class="wf-text-sm">Small text</span>
<span class="wf-text-base">Base text</span>
<span class="wf-text-lg">Large text</span>
<h2 class="wf-text-4xl">Display heading</h2>
Font Family
Three font family utilities plus the
wf-page
and
wf-body
base classes. Override the underlying CSS custom properties on
:root
to change fonts globally without touching component CSS.
wf-font-headings - Poppins
The quick brown fox jumps over the lazy dog.
default / wf-page - Inter
The quick brown fox jumps over the lazy dog.
wf-font-serif - Georgia
The quick brown fox jumps over the lazy dog.
wf-font-mono - Space Mono
const greeting = 'Hello, world!';
HTML
Copy
<p class="wf-font-headings">Poppins</p>
<p class="wf-font-serif">Georgia</p>
<p class="wf-font-mono">Space Mono</p>
CSS - override font stacks
Copy
:root {
--font-family: "Your Body Font", system-ui, sans-serif;
--font-headings: "Your Heading Font", sans-serif;
--font-serif: Georgia, serif;
--font-mono: "Your Mono Font", monospace;
}
Font Weight
Maps to the 7 weights (200, 300, 400, 500, 600, 700, 900).
The quick brown fox
wf-font-light
font-weight: 300
The quick brown fox
wf-font-light
font-weight: 300
The quick brown fox
wf-font-normal
font-weight: 400
The quick brown fox
wf-font-medium
font-weight: 500
The quick brown fox
wf-font-semibold
font-weight: 600
The quick brown fox
wf-font-bold
font-weight: 700
The quick brown fox
wf-font-black
font-weight: 900
HTML
Copy
<p class="wf-font-light">Light 300</p>
<p class="wf-font-normal">Normal 400</p>
<p class="wf-font-semibold">Semibold 600</p>
<p class="wf-font-bold">Bold 700</p>
Text Colors
Semantic tokens for UI text, plus a color class for every brand token in the color system. Inverted variants follow the same naming pattern with
-inverted
appended.
Semantic
wf-text-default
wf-text-muted
wf-text-primary
wf-text-success
wf-text-warning
wf-text-danger
Brand colors
primary
secondary
positive
negative
alert
sage
indigo
earth
info
forest
plum
lavender
dusk
Grey scale
grey-100
grey-200
grey-300
grey-400
grey-500
grey-600
grey-700
HTML
Copy
<p class="wf-text-muted">Muted helper text</p>
<p class="wf-text-danger">Error message</p>
<p class="wf-text-primary">Branded text</p>
<p class="wf-text-positive">Success copy</p>
<!-- Inverted (lighter tint) -->
<p class="wf-text-primary-inverted">Inverted primary</p>
Utilities
Alignment
Align text left, center, right, justified, or bidirectionally with start/end.
Left aligned text - wf-text-left
Center aligned text - wf-text-center
Right aligned text - wf-text-right
Justified text flows to fill the full width of the container on every line except the last - wf-text-justify
Direction-aware start (LTR=left, RTL=right) - wf-text-start
Direction-aware end (LTR=right, RTL=left) - wf-text-end
HTML
Copy
<p class="wf-text-left">Left</p>
<p class="wf-text-center">Center</p>
<p class="wf-text-right">Right</p>
<p class="wf-text-justify">Justified</p>
<p class="wf-text-start">Justified</p>
<p class="wf-text-end">Justified</p>
Transform & Decoration
Transform text case: uppercase, lowercase, capitalize, or normal.
wf-uppercase
WF-LOWERCASE
wf-capitalize each word
wf-italic style
wf-underline
wf-overline
wf-line-through
HTML
Copy
<span class="wf-uppercase">uppercase</span>
<span class="wf-lowercase">LOWERCASE</span>
<span class="wf-capitalize">capitalize each word</span>
<span class="wf-italic">italic</span>
<span class="wf-underline">underline</span>
<span class="wf-line-through">line-through</span>
Line Height & Letter Spacing
Six line-height values from tight (1) to lose (2). Six tracking (letter-spacing) levels from tighter to widest.
Line height
The quick brown fox jumps over the lazy dog and then runs away.
wf-leading-none (1.0)
The quick brown fox jumps over the lazy dog and then runs away.
wf-leading-tight (1.25)
The quick brown fox jumps over the lazy dog and then runs away.
wf-leading-normal (1.5)
The quick brown fox jumps over the lazy dog and then runs away.
wf-leading-loose (2.0)
Letter spacing
The quick brown fox jumps over the lazy dog and then runs away
wf-tracking-tighter (−0.05em)
The quick brown fox jumps over the lazy dog and then runs away
wf-tracking-tight (−0.025em)
The quick brown fox jumps over the lazy dog and then runs away
wf-tracking-normal (0)
The quick brown fox jumps over the lazy dog and then runs away
wf-tracking-wide (0.025em)
The quick brown fox jumps over the lazy dog and then runs away
wf-tracking-wider (0.05em)
The quick brown fox jumps over the lazy dog and then runs away
wf-tracking-widest (0.1em)
HTML
Copy
<p class="wf-leading-tight">Tight line height</p>
<p class="wf-leading-relaxed">Relaxed line height</p>
<p class="wf-tracking-wide">Wide letter spacing</p>
<p class="wf-tracking-widest wf-uppercase">Spaced caps label</p>
Overflow & Wrapping
Control how overflow text and whitespace are handled.
wf-truncate
The quick brown fox jumps over the lazy dog and keeps running past the fence into the field.
wf-break-words
https://example.com/very/long/path/that/does/not/wrap/naturally/without/help
wf-whitespace-nowrap
This text will not wrap at all and will overflow or be clipped by the container.
HTML
Copy
<!-- Single-line truncation with ellipsis -->
<p class="wf-truncate">Very long text...</p>
<!-- Break long URLs / unbreakable strings -->
<p class="wf-break-words">https://example.com/...</p>
<p class="wf-clip">will not wrap at all</p>
Class Reference
Class pattern
Description
wf-text-{scale}
Fluid font size. Steps:
xxs
(≈0.625rem) ·
xs
·
sm
·
base
(≈1rem) ·
md
·
lg
·
xl
·
2xl
·
3xl
·
4xl
·
5xl
·
6xl
·
7xl
·
8xl
·
9xl
(≈7.5rem max).
wf-font-{family}
Font family override. Variants:
mono
(Space Mono) ·
serif
(Georgia) ·
headings
(Poppins).
wf-font-{weight}
Font weight. Variants:
thin
200 ·
light
300 ·
normal
400 ·
medium
500 ·
semibold
600 ·
bold
700 ·
black
900.
wf-italic / wf-not-italic
Sets
font-style: italic
or
normal
.
wf-text-{color}
Text color. Semantic:
default
·
muted
·
muted-60/70/80
·
primary
·
success
·
warning
·
danger
. Brand:
secondary
·
positive
·
negative
·
alert
·
sage
·
indigo
·
earth
·
info
·
forest
·
plum
·
lavender
·
dusk
·
light
·
dark
·
white
·
grey
. Grey scale:
grey-100
…
grey-700
. Inverted variants: append
-inverted
to any brand name.
wf-leading-{n}
Line height. Variants:
none
1 ·
tight
1.25 ·
snug
1.375 ·
normal
1.5 ·
relaxed
1.625 ·
loose
2.
wf-tracking-{n}
Letter spacing. Variants:
tighter
−0.05em ·
tight
−0.025em ·
normal
0 ·
wide
0.025em ·
wider
0.05em ·
widest
0.1em.
wf-text-{align}
Text alignment. Variants:
left
·
center
·
right
·
justify
·
start
·
end
(logical start/end respect writing direction).
wf-uppercase / wf-lowercase / wf-capitalize / wf-normal-case
Text transforms utilities.
wf-underline / wf-overline / wf-line-through / wf-no-underline
Text decoration lines.
wf-truncate
Single-line ellipsis truncation. Sets
overflow:hidden;
text-overflow:ellipsis; white-space:nowrap
.
wf-whitespace-{n}
White-space handling. Variants:
normal
·
nowrap
·
pre
·
pre-wrap
·
pre-line
.
wf-break-{n}
Word/overflow break. Variants:
normal
·
words
(overflow-wrap) ·
all
(word-break) ·
keep
(CJK-safe).
wf-link
Styled anchor. Sets primary color with hover opacity transition.
wf-page
Base page typography: antialiasing, 1rem body size, Inter font,
--wf-text
color, 1.5 line-height.
Show More