Styleguide

Typography

Heading levels, text sizes, and font families — all driven by Automatic.css variables. Sizes are fluid and responsive out of the box.

Headings

H1–h1

The quick brown fox

H2–h2

The quick brown fox

H3–h3

The quick brown fox

H4–h4

The quick brown fox

H5–h5
The quick brown fox
H6–h6
The quick brown fox

Text Sizes

XXL–text-xxl

The quick brown fox jumps over the lazy dog.

XL–text-xl

The quick brown fox jumps over the lazy dog.

L–text-l

The quick brown fox jumps over the lazy dog.

M (Base)–text-m

The quick brown fox jumps over the lazy dog.

S–text-s

The quick brown fox jumps over the lazy dog.

XS–text-xs

The quick brown fox jumps over the lazy dog.

Font Families

Each card prints the family its token resolves to, read from the rendered specimen. ACSS declares –heading-font-family and –text-font-family only when a font is entered in its dashboard. On a site that sets its fonts elsewhere the token does not exist, the card says so, and reports the family the headings actually render in.

Heading Font Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz0123456789 !@#$%&var(–heading-font-family)
Body / Text Font Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz0123456789 !@#$%&var(–text-font-family)

Body Text

This is a standard body text paragraph rendered at the default text size with your configured line-height and max-width.

A second paragraph demonstrates content spacing. ACSS Smart Content Spacing handles the vertical rhythm between paragraphs, headings, lists, and other elements automatically.

Colors

The six ACSS color families with auto-generated shades (OKLCH in v4). Each swatch uses the corresponding CSS variable — change your ACSS dashboard and this guide updates instantly. Use color-mix() for transparencies.

Primary

Your action color — buttons, links, CTAs.

Shades

–primary-ultra-light
–primary-light
–primary-semi-light
–primary
–primary-semi-dark
–primary-dark
–primary-ultra-dark
–primary-hover

Secondary

Your secondary brand color.

Shades

–secondary-ultra-light
–secondary-light
–secondary-semi-light
–secondary
–secondary-semi-dark
–secondary-dark
–secondary-ultra-dark
–secondary-hover

Tertiary

Your third brand color.

Shades

–tertiary-ultra-light
–tertiary-light
–tertiary-semi-light
–tertiary
–tertiary-semi-dark
–tertiary-dark
–tertiary-ultra-dark
–tertiary-hover

Accent

Your least-used brand color — sparingly for emphasis.

Shades

–accent-ultra-light
–accent-light
–accent-semi-light
–accent
–accent-semi-dark
–accent-dark
–accent-ultra-dark
–accent-hover

Base

Your preferred neutral color — backgrounds, text, borders.

Shades

–base-ultra-light
–base-light
–base-semi-light
–base
–base-semi-dark
–base-dark
–base-ultra-dark
–base-hover

Neutral

Black, white, and shades of grey.

Shades

–neutral-ultra-light
–neutral-light
–neutral-semi-light
–neutral
–neutral-semi-dark
–neutral-dark
–neutral-ultra-dark
–neutral-hover

Semantic Colors

Success, warning, info and danger, with the same eight-shade scale as the brand colours. All four slots ship switched off: until they are enabled in the dashboard's Semantic Colors panel, ACSS emits nothing for them, and a hatched swatch below means exactly that.

Success

–success-ultra-light
–success-light
–success-semi-light
–success
–success-semi-dark
–success-dark
–success-ultra-dark
–success-hover

Warning

–warning-ultra-light
–warning-light
–warning-semi-light
–warning
–warning-semi-dark
–warning-dark
–warning-ultra-dark
–warning-hover

Info

–info-ultra-light
–info-light
–info-semi-light
–info
–info-semi-dark
–info-dark
–info-ultra-dark
–info-hover

Danger

–danger-ultra-light
–danger-light
–danger-semi-light
–danger
–danger-semi-dark
–danger-dark
–danger-ultra-dark
–danger-hover

Contextual Text Colors

–text-darkThe quick brown fox jumps over the lazy dog.
–text-dark-mutedThe quick brown fox jumps over the lazy dog.
–text-lightThe quick brown fox jumps over the lazy dog.
–text-light-mutedThe quick brown fox jumps over the lazy dog.

Color Scheme (Light / Dark)

.scheme–light
Shades invert
–primary-ultra-light
–primary-dark
–neutral-light
–neutral-dark
–white
–black
Main colours stay
–primary
–secondary

Heading sample

ACSS emits light-dark() for every palette variable. Shades invert, so –primary-ultra-light shows the ultra-dark value and –white and –black swap. Main colours and hover variants do not invert: they hold the same value in both schemes, which is why –primary and –secondary are identical above. That is the documented behaviour, not a broken demo, and Main Color Override in the dashboard is where you change it. Force a scheme on any element with .scheme–light or .scheme–dark.

Standard linkPrimary Button

Both cards paint this button with the same fill on purpose: –primary is a main colour and does not invert. Its label does, because a label colour is a shade. Measured here: fill oklch(0.664 0.107 202) in both cards, label lightness 0.95 in light against 0.10 in dark. That asymmetry is what makes some solid buttons unreadable under a dark scheme, see Buttons on Assigned Backgrounds.

.scheme–dark
Shades invert
–primary-ultra-light
–primary-dark
–neutral-light
–neutral-dark
–white
–black
Main colours stay
–primary
–secondary

Heading sample

ACSS emits light-dark() for every palette variable. Shades invert, so –primary-ultra-light shows the ultra-dark value and –white and –black swap. Main colours and hover variants do not invert: they hold the same value in both schemes, which is why –primary and –secondary are identical above. That is the documented behaviour, not a broken demo, and Main Color Override in the dashboard is where you change it. Force a scheme on any element with .scheme–light or .scheme–dark.

Standard linkPrimary Button

Both cards paint this button with the same fill on purpose: –primary is a main colour and does not invert. Its label does, because a label colour is a shade. Measured here: fill oklch(0.664 0.107 202) in both cards, label lightness 0.95 in light against 0.10 in dark. That asymmetry is what makes some solid buttons unreadable under a dark scheme, see Buttons on Assigned Backgrounds.

Spacing

Content spacing and contextual gaps. All values are fluid and responsive via ACSS clamp() functions. Nested containers show how each spacing level relates to the others — padding is applied to all sides so you can see both block and inline simultaneously.

Content Spacing (padding — all sides)

XXL –space-xxl
XL –space-xl
L –space-l
M –space-m
S –space-s
XS –space-xs
inner content

Bridge Variables

Every downward pairing of the scale exists as one fluid token, –space–to-, 15 for content spacing and the same 15 again for section spacing. A bridge spans a wider range than either end alone: desktop of the large size down to mobile of the small one. At desktop width a bridge and its plain counterpart print almost the same value below; narrow the window and the bridge falls faster.

–space-l
padding: var(–space-l)
–space-l-to-xs
padding: var(–space-l-to-xs)
–space-xl
padding: var(–space-xl)
–space-xl-to-xs
padding: var(–space-xl-to-xs)

The section scale has the identical matrix, –section-space-xl-to-m and friends, for section padding that has to collapse harder on mobile than the fluid calculation alone would.

Contextual Gaps

–content-gap
Heading
Paragraph
Paragraph
List
–grid-gap
–container-gap
Container 1
Container 2
Container 3
–gutter
Content area — gutter is the colored space on left and right

Section Spacing

Vertical rhythm between sections. Each ring shows its actual padding-block value — the visible vertical space is the real section padding applied by ACSS.

Section Spacing (padding-block)

XXL –section-space-xxl
XL –section-space-xl
L –section-space-l
M –section-space-m
S –section-space-s
section content

Layout & Grids

ACSS's utility grids and the Content Grid. The zones are additive offsets on one shared width: feature is content plus 2 × –feature-width, feature-max adds –feature-max-width on top, full spans everything. So a content width that already fills the container leaves the zones nowhere to go, and every child renders the same width with no error.

Standard & Auto Grids

ACSS 4 is variable-first: the .grid–* utility classes were removed with most class modules, and grids are built from variables on your own class or, as here, inline. Each demo below is one declaration, grid-template-columns: var(–grid-N), with gap riding the contextual –grid-gap. The auto variants pack columns by available space.

grid-template-columns: var(–grid-3)
1
2
3
4
5
6
grid-template-columns: var(–grid-1-2)
1fr
2fr
grid-template-columns: var(–grid-auto-3)
1
2
3
4
5

Content Grid

One grid with named zones. Children land in the centred content zone by default and opt out sideways with a class. The bands below are live children of a real .content-grid, their widths measured off the rendered page. Here full is the section's inner width; on a real page it is the viewport.

content (default)
.content–feature
.content–feature-max
.content–full
.content–full-safe
–content-width
container width AND content zone, one setting for both jobs
–feature-width
half the feature zone's extra width, per side
–feature-max-width
added on top of feature, per side

Two traps worth naming. The zone rules select direct children, so wrapping a grid's content in a container silently disables every zone class below it. And because –content-width does double duty, a wide container setting collapses all zones onto the content width with no error. Opt a single box out of a defaulted grid with .content-grid–off.

Borders, Radius & Dividers

The tokens this guide borrows for its own chrome, finally shown as specimens. –radius is one dial, not a scale: –radius-m resolves straight to –radius here, and the remaining radius tokens are fixed geometry, 0, 50% and 50vw. The composites assemble the pieces: –border is –border-size –border-style –border-color-dark.

Borders

–border paints with –border-color-dark, a translucent mix of –black, so it rides any light surface. –border-light is the same composite built on –white, for dark surfaces, shown here on a bg–dark strip.

–border
border: var(–border)
–border-light
border: var(–border-light)
–border
–border-size –border-style –border-color-dark
–border-light
same composite on –border-color-light
–border-size
shared thickness
–border-style
shared line style
–border-color-dark
translucent mix of –black, for light surfaces
–border-color-light
translucent mix of –white, for dark surfaces

Radius

Deliberately a single dial. Each square carries its token as border-radius and prints the value it resolves to. Squares, not bars: –radius-50 and –radius-circle only read correctly on one.

–radius
–radius-m
–radius-none
–radius-50
–radius-circle

Dividers

A divider is a border on its own line. –divider assembles –divider-size and –divider-style with whichever colour the dashboard's Default Divider Scheme picks; –divider-dark and –divider-light are the same composite pinned to one colour, shown here on a light and a dark surface. Below that, each dashboard setting on its own. –divider-gap rides –content-gap so the spacing follows the site's rhythm and sits on both sides of the rule, margin above and padding below, as the ?divider-all recipe lays it out, and –divider-inline-size is for dividers drawn as pseudo-elements rather than borders. Every value is measured.

on a light surface

–divider
–divider-dark
–divider-light

on bg–dark

–divider
–divider-dark
–divider-light
–divider-size
–divider-style
–divider-color-dark
–divider-color-light
–divider-inline-size
–divider-gap

First item

Second item

Third item

?divider-top
–divider above, –divider-gap as padding
?divider-bottom
–divider below, –divider-gap as padding
?divider-all
–divider between every child, gap via margin

Shadows & Elevation

Three steps per scale, 1 to 3, each black mixed at increasing opacity and blur; shipped 4.0.1 has no six-step ladder and no -subtle step. The specimens sit on a fixed light panel because a shadow on a dark page is invisible, which is a property of shadows, not of the tokens.

Box Shadows

–box-shadow-1
–box-shadow-2
–box-shadow-3

Text Shadows

–text-shadow-1

–text-shadow-2

–text-shadow-3

Drop Shadows

filter: drop-shadow() follows the rendered contour instead of the box, which only shows on a non-rectangular shape. The filter sits on a parent and the clip-path on a child; on one element the clip would cut the shadow away with it.

–drop-shadow-1
–drop-shadow-2
–drop-shadow-3

Surfaces & Backgrounds

The background utility classes and the assignment tokens behind them. A .bg–* class does more than paint: Automatic Color Relationships assign text, heading, link and button treatment for that context, which is why this guide's own panels carry these classes instead of colours.

Assigned Backgrounds

.bg–ultra-light

Text on this surface is assigned by Automatic Color Relationships, not set by the guide.

.bg–light

Text on this surface is assigned by Automatic Color Relationships, not set by the guide.

.bg–dark

Text on this surface is assigned by Automatic Color Relationships, not set by the guide.

.bg–ultra-dark

Text on this surface is assigned by Automatic Color Relationships, not set by the guide.

Background & Text Assignment Tokens

The tokens the classes resolve to. –text-color, the body default, is –text-dark-muted, a translucent mix, not –text-dark; opaque body text is an explicit override.

Backgrounds

–bg-ultra-light
–bg-light
–bg-dark
–bg-ultra-dark

Text

–text-dark
–text-dark-muted
–text-light
–text-light-muted
–text-color

Brand Surfaces, Variable-first

There is no .bg–primary in ACSS 4: the contextual classes are exactly the four assigned ones above, and everything else went variable-first when the utility class modules were removed. A brand surface is painted with the token directly, and because no class is involved, Automatic Color Relationships do not fire: foreground and background are picked by hand, as in the strip below.

background: var(–primary-dark)color: var(–primary-ultra-light)

No class, no relationship: this pairing is a manual choice. Both tokens are shades from one family on purpose, shades invert together under a colour scheme, so the pairing holds in light and dark. Pairing a shade with the main colour does not: the shade flips, the main colour stays, and the two meet.

Accessibility & Focus

The focus system is context-aware: –focus-color is reassigned by every background relationship, so the ring on a dark panel is not the ring on the page. Every link and button in this guide is a real target, so the whole document is keyboard-testable.

Focus

Tab through the row below. The ring is ACSS's own focus styling, a specimen; the guide adds nothing to it.

–focus-color
reassigned per background context, the ring adapts to its surface
–focus-width
ring thickness
–focus-offset
gap between element and ring

Screen-reader Text

.hidden-accessible keeps an element out of the visual layout while assistive technology still renders it. The box below contains a second sentence you cannot see; a screen reader, or the element inspector, finds it.

This box also holds a visually hidden sentence.

You found it: this sentence is exposed to screen readers and invisible on screen.

Reduced Motion

ACSS wraps its motion output in prefers-reduced-motion guards, and this guide follows the same signal: smooth scrolling and the scheme switch transition turn off when the OS asks for less motion. There is nothing to see here unless your system requests it, which is the point.