Skip to content

acss-utilities Overview

acss-utilities provides a pre-built bundle of Tailwind-style atomic CSS utility classes that connect to your acss-kit theme via a token bridge.

12 utility families

Spacing, flex, grid, display, color, typography, radius, shadow, position, and z-index — covering the utility classes you reach for most.

Token bridge

A token-bridge.css that maps utility class color names to your acss-kit --color-* roles, including dark mode parity and derived -bg / -light variants.

CommandWhat it does
/utility-addCopy utilities.css + token-bridge.css into your project
/utility-listBrowse families and classes — read-only
/utility-tuneAdjust spacing, breakpoints, or family settings via natural language
/utility-bridgeRegenerate the token bridge against your active acss-kit theme
FamilyResponsiveExample classes
color-bgNo.bg-primary, .bg-surface, .bg-error
color-textNo.text-primary, .text-muted, .text-inverse
color-borderNo.border-primary, .border-error
spacingYes.m-4, .mt-2, .px-6, .gap-3
displayYes.hide, .show, .sr-only, .print-hide
flexYes.flex, .flex-col, .justify-center, .items-center
gridYes.grid, .grid-cols-2, .grid-cols-12
typeNo.text-xs, .text-lg, .font-bold, .italic
radiusNo.rounded-sm, .rounded-md, .rounded-full
shadowNo.shadow-sm, .shadow-md, .shadow-lg
positionNo.relative, .absolute, .fixed, .sticky
z-indexNo.z-10, .z-20, .z-50, .z-auto

Six families support responsive prefixes. The prefix activates the utility at that breakpoint and above:

<div className="flex-col md-flex-row lg-gap-8">
{/* vertical on mobile, horizontal from md up, larger gap from lg up */}
</div>

Breakpoints: sm (30rem) · md (48rem) · lg (62rem) · xl (80rem)

The token bridge (token-bridge.css) maps utility color class names to your acss-kit theme tokens and synthesizes derived variants via color-mix():

:root {
--color-error: var(--color-danger, #dc2626);
--color-error-bg: color-mix(in oklch, var(--color-danger, #dc2626) 12%, var(--color-background, #fff));
--color-primary-light: color-mix(in oklch, var(--color-primary, #4f46e5) 80%, white);
}
[data-theme="dark"] {
--color-error: var(--color-danger, #f87171);
--color-error-bg: color-mix(in oklch, var(--color-danger, #f87171) 18%, var(--color-background, #0f172a));
}

Hyphen-prefix responsive variants. Instead of the colon-prefix (md:flex) used by Tailwind (which requires escaping in JSX), acss-utilities uses md-flex. This works cleanly in className strings without escaping.

No prefix on class names. Classes are unprefixed (.flex, .bg-primary). This matches fpkit/acss conventions and keeps markup readable.

!important policy. Only display and visibility utilities use !important. All other utilities rely on normal cascade ordering — put your utility import after component styles to ensure utilities win when needed.

Standalone use. All color utilities have hardcoded hex fallbacks, so the bundle works without acss-kit. Run /utility-add --no-bridge to skip the token bridge.