Decanter v8

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.

Choose root font size:

Typography

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

Headings & Display Type

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

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

A paragraph with .types .type-3 styled like a heading

Modular Type Scale

.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 Scale

.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

Font Size Utilities

.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.

Base Font Classes

.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.

Text Styles

.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.

Line Heights

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.

Inline Elements & Code

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.

Preformatted Text

  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 : ; < = > ?
  

Lists

Unordered

  • List item one
  • List item two
    • Nested item
  • List item three

Ordered

  1. List item one
  2. List item two
  3. List item three

Definition List

Definition list title
This is a definition list description.
Another title
Another description.

.list-unstyled

  • No bullets
  • No padding
  • No list styling at all

.list-horizontal

  • Item one
  • Item two
  • Item three

WYSIWYG

The .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.

Heading Level 2

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.

Heading Level 3 (stacked directly after content)

Headings that follow content get extra top margin; stacked headings get less.

  • List item one
  • List item two

Heading Level 4

  1. Ordered item one
  2. Ordered item two

The last child of the wrapper has its bottom margin removed.

Colors

The full Stanford Identity palette from identity.stanford.edu. Each swatch lists its Tailwind token and hex value.

Primary & Grayscale

Cardinal Red

cardinal-red-light

#B83A4B

cardinal-red

#8C1515

cardinal-red-dark

#820000

cardinal-red-xdark

#7A0000

cardinal-red-xxdark

#541107

Grayscale

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

Web Interactive

Digital Red

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

digital-blue-light

#85CCFF

digital-blue

#006CB8

digital-blue-dark

#00548F

digital-blue-vivid

#0597FF

Digital Green

digital-green-light

#1AECBA

digital-green

#008566

digital-green-dark

#006F54

digital-green-bright

#009B76

Accent

Palo Alto

palo-alto-light

#2D716F

palo-alto

#175E54

palo-alto-dark

#014240

Palo Verde

palo-verde-light

#59B3A9

palo-verde

#279989

palo-verde-dark

#017E7C

Olive

olive-light

#A6B168

olive

#8F993E

olive-dark

#7A863B

Bay

bay-light

#8AB8A7

bay

#6FA287

bay-dark

#417865

Sky

sky-light

#67AFD2

sky

#4298B5

sky-dark

#016895

Lagunita

Lagunita 20 and 40 are used for form elements.

lagunita-light

#009AB4

lagunita

#007C92

lagunita-dark

#006B81

lagunita-20

#CCEBF0

lagunita-40

#8DD8E4

Poppy

poppy-light

#F9A44A

poppy

#E98300

poppy-dark

#D1660F

Spirited

spirited-light

#F4795B

spirited

#E04F39

spirited-dark

#C74632

Illuminating

illuminating-light

#FFE781

illuminating

#FEDD5C

illuminating-dark

#FEC51D

Plum

plum-light

#734675

plum

#620059

plum-dark

#350D36

Brick

brick-light

#7F2D48

brick

#651C32

brick-dark

#42081B

Archway

archway-light

#766253

archway

#5D4B3C

archway-dark

#2F2424

Stone

stone-light

#D4D1D1

stone

#7F7776

stone-dark

#544948

Fog

fog-light

#F4F4F4

fog

#DAD7CB

fog-dark

#B6B1A9

Layout & Spacing

Centered Container

.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.

content edge follows the screen margins

Grid Gap

.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.

1
2
3
4
5
6

Responsive Spacing

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-p-0
rs-p-1
rs-p-2
rs-p-3
rs-p-4
rs-p-5
rs-p-6
rs-p-7
rs-p-8
rs-p-9
rs-p-10

.rs-gap-2

1
2
3

Spacing Scale

Decanter 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.

Aspect Ratios

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

Breakpoints

Decanter's breakpoints differ from Tailwind's defaults and add 3xl and 4xl.

Current breakpoint: XS <576px

Breakpoint tokens
Token Min width
sm 576px
md 768px
lg 992px
xl 1200px
2xl 1500px
3xl 1700px
4xl 2000px

Components

Buttons

The .button component works on buttons, inputs, and links. Hover/focus transitions use Decanter's default 0.25s duration.

Link styled as button

Tables

Default table (base styles)

Table caption is muted and left-aligned
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

Forms

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'.

Input fields

Select

Checkboxes
Radio buttons
Textarea

Images & Captions

The base layer styles figcaption automatically; .caption gives any element the same treatment.

Placeholder landscape photograph
A native figcaption — muted, snug, and slightly smaller than body text.

Utilities & Variants

Text Shadow (Legacy)

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

Custom Variants

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: