CSS is Awesome

Utility classes

css-is-awesome ships a namespaced utility layer — every class is prefixed .cia-* so it never collides with host app styles. Utilities are composed directly in markup for one-off layout, spacing, and colour adjustments. The mixin API is still the primary surface of the system; utilities are the escape hatch for rapid prototyping and small tweaks.

Naming convention

All utilities follow cia-<property>-<value> or cia-<property>-<axis>-<value>. The cia- prefix is mandatory — it keeps the utility layer from bleeding into host application styles, plugins, or third-party components that share the same page.

Reach for a utility when the rule is a one-off or you are sketching layout. Reach for a mixin when the styling is semantic, reused, or part of a component contract. Most production code should lean on mixins; utilities are there to keep the last 10% fast.

Spacing

Margin, padding, and gap utilities generate for every step of the spacing scale — numeric keys (19) plus t-shirt aliases (xs, sm, md, lg, xl, 2xl, 3xl, 4xl), plus 0, none, and 2xs.

The pattern is cia-<side>-<step>. Sides: m (margin), p (padding), or an axis variant (mx, my, px, py), or a single edge (mt, mr, mb, ml, pt, pr, pb, pl).

Scale reference

StepAliasValuePixels
0 / none00
2xs0.25rem4
1xs0.5rem8
2sm0.75rem12
30.875rem14
4md1rem16
5lg1.5rem24
6xl2rem32
72xl3rem48
83xl4rem64
94xl6rem96

Padding in action

cia-p-2
cia-p-4
cia-p-6
cia-px-6 cia-py-2
<div class="cia-p-4">...</div>
<div class="cia-px-6 cia-py-2">...</div>

Margin & gap

Flex & grid

Display, direction, alignment, wrap, grow/shrink, and common composition shortcuts. Pair with cia-gap-* for spacing between children.

Display

Flex direction & wrap

Flex children

Alignment

Composition shortcuts

Live example

LeftCenterRight
<div class="cia-flex cia-items-center cia-justify-between cia-gap-4 cia-p-4">
  ...
</div>

Grid columns & spans

1
2
3
col-span-2
last
<div class="cia-grid cia-grid-cols-3 cia-gap-3">
  <div class="cia-col-span-2">...</div>
</div>

Text

Text utilities cover alignment, transform, decoration, size, weight, line height, and letter spacing. Sizes and weights read from CSS custom properties so they stay theme-aware.

Alignment & decoration

ClassCSS
cia-text-lefttext-align: left
cia-text-centertext-align: center
cia-text-righttext-align: right
cia-text-justifytext-align: justify
cia-uppercasetext-transform: uppercase
cia-lowercasetext-transform: lowercase
cia-capitalizetext-transform: capitalize
cia-normal-casetext-transform: none
cia-underlinetext-decoration: underline
cia-line-throughtext-decoration: line-through
cia-no-underlinetext-decoration: none
cia-truncateoverflow-hidden + ellipsis + nowrap
cia-whitespace-nowrapwhite-space: nowrap
cia-whitespace-normalwhite-space: normal
cia-break-wordsoverflow-wrap: break-word

Size, weight, leading, tracking

cia-text-xs — the quick brown fox

cia-text-base — the quick brown fox

cia-text-lg cia-font-semibold

cia-text-2xl cia-font-bold

cia-uppercase cia-tracking-widest

<p class="cia-text-2xl cia-font-bold">...</p>
<p class="cia-uppercase cia-tracking-widest">...</p>

Colour

Colour utilities read semantic tokens from theme.css, so swapping theme files reskins every utility at once.

Text colour

cia-text-<token> — tokens: primary, secondary, muted, inverse, link, plus status tokens success-text, warning-text, error-text, info-text.

Background colour

cia-bg-<token> — tokens include background-default, background-subtle, background-navbar; surfaces surface-default, surface-subtle, surface-muted, surface-emphasis; status success-subtle, warning-subtle, error-subtle, info-subtle; actions action-primary-default, action-secondary-default.

Border colour

cia-border-<token> — tokens: default, subtle, emphasis, focus.

surface
surface-subtle
success
error
<div class="cia-bg-success-subtle cia-text-success-text cia-p-4 cia-rounded-md">...</div>

Display

ClassCSS
cia-blockdisplay: block
cia-inline-blockdisplay: inline-block
cia-inlinedisplay: inline
cia-flexdisplay: flex
cia-inline-flexdisplay: inline-flex
cia-griddisplay: grid
cia-inline-griddisplay: inline-grid
cia-hiddendisplay: none
cia-contentsdisplay: contents

Responsive variants

Mobile-first breakpoint prefixes apply the rule at and above the named breakpoint. The pattern is cia-<bp>\:<utility> — in HTML you write it unescaped, e.g. cia-md:flex.

PrefixMin widthPixels
cia-sm:40rem640
cia-md:48rem768
cia-lg:64rem1024
cia-xl:80rem1280
cia-2xl:96rem1536

Responsive variants are generated for the display, flex, grid, text alignment, and spacing (m/p) families — the utilities most commonly reached for when a layout needs to change at a breakpoint. Everything else is left single-variant to keep the stylesheet small.

<!-- stacked on mobile, row from md up -->
<div class="cia-flex cia-flex-col cia-md:flex-row cia-gap-4">
  ...
</div>

Full index

The categories above cover the utilities you reach for day-to-day. Everything else that ships in the utility layer is listed here as a compact reference.

Position & inset

Sizing

Border, radius, shadow

Opacity, z-index, overflow

Cursor & interaction

Accessibility

Animation & hover

Theme