Font Families
.font-sans — Source Sans 3
The quick brown fox jumps over the lazy dog.
.font-serif — Source Serif 4
The quick brown fox jumps over the lazy dog.
.font-stanford — Stanford (wordmark only)
Stanford University
A test page for the Decanter design system on Tailwind CSS v4. Every custom Decanter theme token, component, utility, and variant is demonstrated below — core Tailwind features are only shown where Decanter changes their defaults.
.font-sans — Source Sans 3
The quick brown fox jumps over the lazy dog.
.font-serif — Source Serif 4
The quick brown fox jumps over the lazy dog.
.font-stanford — Stanford (wordmark only)
Stanford University
Headings h1–h6 are styled by the Decanter base
layer.
.splash-text is for hero banners, and .types applies heading styles
(weight, line height, spacing) to any element without changing its size.
Splash Text
A paragraph with .types .type-3 styled like a heading
.type-0 through .type-10. Each step scales
responsively at the md and lg breakpoints with letter spacing
proportional to size. .type-0 equals the base font size (1em).
.type-0
.type-1
.type-2
.type-3
.type-4
.type-5
.type-6
.type-7
.type-8
.type-9
.type-10
.fluid-type-0 through .fluid-type-10 scale
smoothly and linearly with the viewport between 360px and 1500px using clamp()
— resize the window to see it. Min/max sizes match the modular scale. Good for hero
banners and horizontal cards.
.fluid-type-0
.fluid-type-1
.fluid-type-2
.fluid-type-3
.fluid-type-4
.fluid-type-5
.fluid-type-6
.fluid-type-7
.fluid-type-8
.fluid-type-9
.fluid-type-10
.text-<number> uses one pixel-equivalent step,
so the number reads as pixels under either root-size entry — .text-18
is 18px at the browser's default font size. Any integer works. .text-1em,
.text-09em, and .text-input (18px) are also available.
.text-14 — The quick brown fox jumps over the lazy dog.
.text-16 — The quick brown fox jumps over the lazy dog.
.text-18 — The quick brown fox jumps over the lazy dog.
.text-21 — The quick brown fox jumps over the lazy dog.
.text-24 — The quick brown fox jumps over the lazy dog.
.text-30 — The quick brown fox jumps over the lazy dog.
.text-62 — The quick brown fox jumps over the lazy dog.
.basefont-19 through .basefont-23 set a
responsive base font size on a container so all em-based typography inside scales together.
The default body base is 21 (18px → 19px → 21px).
.basefont-19 — A paragraph consists of one or more sentences dealing with a particular point or idea.
.basefont-20 — A paragraph consists of one or more sentences dealing with a particular point or idea.
.basefont-21 — A paragraph consists of one or more sentences dealing with a particular point or idea.
.basefont-22 — A paragraph consists of one or more sentences dealing with a particular point or idea.
.basefont-23 — A paragraph consists of one or more sentences dealing with a particular point or idea.
.intro-text — Larger opening text with a comfortable
reading measure.
.big-paragraph — Slightly larger than body text.
Though not required by the syntax of any language, paragraphs are usually an expected part of
formal writing, used to organize longer prose.
.card-paragraph — Slightly smaller, tighter text
for card teasers, with a 16px floor so it never becomes too small to read.
.subheading — A subheading introduces or supports the heading above
it.
.quote-text — “A quotation styled with the quote-text
class.”
.caption — Caption styling for any element;
same look as a native figcaption without the Cool Grey color, but usable anywhere.
Decanter's leading scale. half and trim
are for tightly cropped display text like the wordmark.
.leading-half (0.5)
Two lines of sample text to show the line height value..leading-trim (0.75)
Two lines of sample text to show the line height value..leading-tight (1.1)
Two lines of sample text to show the line height value..leading-display (1.2)
Two lines of sample text to show the line height value..leading-snug (1.3)
Two lines of sample text to show the line height value..leading-cozy (1.4)
Two lines of sample text to show the line height value..leading-normal (1.5)
Two lines of sample text to show the line height value.This is a text link — digital blue, semibold, underlined; black on hover/focus.
Strong importance, emphasis, bold, italic, and underlined annotation.
Deleted text, inserted text, and strikethrough.
Superscript® and subscript for H2O. Small text for fine print.
Abbreviation: HTML, a short inline quotation
,
a citation, and a definition — cite, var, dfn, and address render
unitalicized by design.
The mark element highlights, and x = y uses the var element.
The time element:
Keyboard input Cmd, inline code <div>code</div>, and sample
output program output render at 0.9em in the mono stack.
P R E F O R M A T T E D T E X T ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
.list-unstyled.list-horizontalThe .wysiwyg wrapper sets vertical rhythm for
unstructured rich text such as CMS output — heading top margins, paragraph and list
spacing, and trimmed first/last children.
A block of rich text as it might come out of a CMS editor, with a link inside a paragraph and sensible spacing between elements.
Headings that follow content get extra top margin; stacked headings get less.
The last child of the wrapper has its bottom margin removed.
The full Stanford Identity palette from identity.stanford.edu. Each swatch lists its Tailwind token and hex value.
cardinal-red-light
#B83A4B
cardinal-red
#8C1515
cardinal-red-dark
#820000
cardinal-red-xdark
#7A0000
cardinal-red-xxdark
#541107
black-true
#000000
black
#2E2D29
black-90
#43423E
black-80
#585754
black-70
#6D6C69
black-60
#767674
black-50
#979694
black-40
#ABABA9
black-30
#C0C0BF
black-20
#D5D5D4
black-10
#EAEAEA
white
#FFFFFF
cool-grey
#53565A
digital-red-dark shares its value with cardinal-red-dark.
digital-red-xlight
#F83535
digital-red-light
#E50808
digital-red
#B1040E
digital-red-dark
#820000
digital-blue-light
#85CCFF
digital-blue
#006CB8
digital-blue-dark
#00548F
digital-blue-vivid
#0597FF
digital-green-light
#1AECBA
digital-green
#008566
digital-green-dark
#006F54
digital-green-bright
#009B76
palo-alto-light
#2D716F
palo-alto
#175E54
palo-alto-dark
#014240
palo-verde-light
#59B3A9
palo-verde
#279989
palo-verde-dark
#017E7C
olive-light
#A6B168
olive
#8F993E
olive-dark
#7A863B
bay-light
#8AB8A7
bay
#6FA287
bay-dark
#417865
sky-light
#67AFD2
sky
#4298B5
sky-dark
#016895
Lagunita 20 and 40 are used for form elements.
lagunita-light
#009AB4
lagunita
#007C92
lagunita-dark
#006B81
lagunita-20
#CCEBF0
lagunita-40
#8DD8E4
poppy-light
#F9A44A
poppy
#E98300
poppy-dark
#D1660F
spirited-light
#F4795B
spirited
#E04F39
spirited-dark
#C74632
illuminating-light
#FFE781
illuminating
#FEDD5C
illuminating-dark
#FEC51D
plum-light
#734675
plum
#620059
plum-dark
#350D36
brick-light
#7F2D48
brick
#651C32
brick-dark
#42081B
archway-light
#766253
archway
#5D4B3C
archway-dark
#2F2424
stone-light
#D4D1D1
stone
#7F7776
stone-dark
#544948
fog-light
#F4F4F4
fog
#DAD7CB
fog-dark
#B6B1A9
.centered-container (alias .cc) applies
Stanford's responsive screen margins on both sides — 20px at XS up to 100px at XL —
and caps content at 1500px, centered, above the 3XL breakpoint. Every section of this page is
wrapped in one. Nested containers get no extra padding.
.grid-gap applies Decanter's responsive gutters in one
class: gap-xs (20px) → gap-lg (36px) at LG →
gap-xl (40px) at XL → gap-2xl (48px) at 2XL. The gap
tokens can also be used directly, e.g. gap-xs lg:gap-lg.
The rs-* utilities apply spacing that grows at the
md and 2xl breakpoints in steps 0 through
10. Available for padding (rs-p, rs-px,
rs-py, rs-pt, rs-pr, rs-pb,
rs-pl), margin (rs-m and friends), and gap (rs-gap,
rs-gap-x, rs-gap-y). The shaded area below is the padding —
resize the window to watch it change.
.rs-gap-2Decanter sets --spacing to one pixel-equivalent
unit, so numeric spacing utilities read as pixels under either entry:
p-16 is 16px and w-300 is 300px. Em-based steps
01em–1em are for
typography rhythm (e.g. mb-05em), and prose-wide (75ch) complements
the core prose (65ch) measure.
.w-100 = 100px
.w-200 = 200px
.w-300 = 300px
This heading uses .mb-02em
so the space above this line is 0.2em of the heading's font size.
Tailwind v4 accepts bare ratios — no brackets needed:
e.g., aspect-3/2 just works. aspect-square covers 1x1. aspect-video
covers 16x9.
aspect-video
aspect-square
aspect-4/3
aspect-3/2
aspect-2/1
aspect-3/4
Decanter's breakpoints differ from Tailwind's defaults and add
3xl and 4xl.
Current breakpoint: XS <576px SM ≥576px MD ≥768px LG ≥992px XL ≥1200px 2XL ≥1500px 3XL ≥1700px 4XL ≥2000px
| Token | Min width |
|---|---|
sm |
576px |
md |
768px |
lg |
992px |
xl |
1200px |
2xl |
1500px |
3xl |
1700px |
4xl |
2000px |
The .logo component sets the Stanford wordmark font,
trim line height, and cardinal red. Override the color for dark backgrounds.
The .button component works on buttons, inputs, and
links. Hover/focus transitions use Decanter's default 0.25s duration.
| Heading 1 | Heading 2 | Heading 3 | Heading 4 |
|---|---|---|---|
| Row heading | Cell 2 | Cell 3 | Cell 4 |
| Row heading | Cell 2 | Cell 3 | Cell 4 |
| Row heading | Cell 2 | Cell 3 | Cell 4 |
| Footer 1 | Footer 2 | Footer 3 | Footer 4 |
.table-borderless| Heading 1 | Heading 2 | Heading 3 | Heading 4 |
|---|---|---|---|
| Row heading | Cell 2 | Cell 3 | Cell 4 |
| Row heading | Cell 2 | Cell 3 | Cell 4 |
Decanter's form classes (.input, .select,
.textarea, .checkbox, .radio, .label,
.legend, .fieldset) are opt-in: they ship together with the
@tailwindcss/forms reset via @import 'decanter/forms'.
The base layer styles figcaption automatically;
.caption gives any element the same treatment.
Add .stretched-link to a link inside a
relative container to make the whole container clickable.
The entire card is clickable via the stretched-link class on the headline.
This page starts with
<a href="#main-content" class="skiplink">. It is visually hidden until
focused — reload and press Tab to reveal it in the top left corner.
These utilities style <a> tags nested inside
the element they are applied to — ideal for WYSIWYG content and components with open
fields. .link-* and .link-hocus-* accept any palette color.
.link-digital-green — a link colored digital
green.
.link-plum — a link colored plum.
.link-hocus-poppy-dark — turns poppy dark
on
hover/focus.
.link-white .link-hocus-illuminating —
a white link that turns illuminating on hover.
.link-no-underline — a link with no
underline.
.link-underline — a link with an underline.
.link-normal — a normal weight link.
.link-semibold — a semibold link.
.link-bold — a bold link.
Decanter's v7 text shadows are kept as
.text-shadow-legacy*; Tailwind v4 now ships its own
text-shadow-* scale.
.text-shadow-legacy
.text-shadow-legacy-md
.text-shadow-legacy-lg
Decanter adds hocus: (hover or focus),
hocus-visible:, and hocus-within:. The group versions
(group-hocus: etc.) come along automatically. Hover or tab through the cards:
hocus:bg-cardinal-red hocus:text-white
Hover or focus turns this card cardinal red.
hocus-visible:bg-digital-blue
Hover works, but focus only triggers via keyboard (focus-visible).
hocus-within:border-digital-green
group + group-hocus:text-plum
This text changes color when the whole card is hovered or focused.