Graffiti

github

CSS Utilities

These utility classes actually have utility.

We aren't replicating CSS with classnames, but providing real functionality to be combined or used individually. If you want a common layout or pattern or even automatic color contrast, we've got you.

Layouts

.layout-card

Auto-fill responsive card grid

Card 1
Card 2
Card 3
Card 4

.layout-sidebar

Sidebar + main content (250px default)

Main Content

&.narrow

Main Content

&.wide

Main Content

&.invert

Main Content

&.fill

Full-height sticky sidebar for app shells. Combine with .split.vertical for sidebar internal layout.

See UI Blocks for full layout templates.

.layout-split

50/50 two column layout

Left Column
Right Column

&.no-stack

Stays side-by-side on mobile

Left
Right

.layout-three-col

Three equal columns

Column 1
Column 2
Column 3

.layout-readable

Max-width for optimal readability (default: start-aligned)

Learning to drop in on a skateboard is an exciting and challenging milestone for any skateboarder. Before attempting to drop in, ensure that you have a solid foundation of basic skateboarding skills.

&.center

Centered readable content with max-width constraint.

&.end

End-aligned readable content with max-width constraint.

Organization

Group and cluster your stuff in common ways.

.stack

Vertical flexbox stack with gap

Item 1
Item 2
Item 3

.cluster

Horizontal wrapping list with gap (perfect for tags, pills, breadcrumbs)

Tag 1 Tag 2 Tag 3 Tag 4 Tag 5 Tag 6

.split

Flex with space-between and top alignment (used in header)

Left Side
Right Side

&.vertical

Vertical split - pushes first and last children to opposite ends

Top
Bottom

.flex

Display flex with 20px gap

Flex Item 1
Flex Item 2
Flex Item 3

.grid

Minimal grid utility (like .flex)

200px
Flexible
200px

Handy Stuff

.readable

Max-width 900px container

This content is constrained to 900px max-width for optimal readability. Unlike .layout-readable, this doesn't include padding.

.no-list

Remove list styling (margin, padding, list-style)

  • Item 1
  • Item 2
  • Item 3

.circle

Circular element (default --size: 40px)

.row

Add vertical margin (--vs-m)

No .row class
With .row class - has margin-block
No .row class

.visually-hidden

Hide element visually but keep accessible to screen readers

There is hidden text after this colon: This text is hidden visually but available to screen readers!

You can't see it, but it's there for accessibility.

.auto-color

Automatically sets text color (light or dark) based on background luminosity

Blue background
Yellow background
Dark red background
Green background
Purple background

Set --bg-color and the text color adjusts automatically

Aspect Ratio Utilities

Maintain specific aspect ratios for containers (useful for images, videos, cards)

.aspect-square
1:1
.aspect-video
16:9
.aspect-4-3
4:3
.aspect-21-9
21:9

Custom: Use aspect-ratio: 2 / 1; or aspect-ratio: var(--aspect-ratio);

.fc (Fluid Container)

Makes typography responsive to container width instead of viewport

Regular (viewport-based)

This heading scales with viewport

Text scales with viewport width

With .fc (container-based)

This heading scales with container

Text scales with this box's width

Font Sizing

.h1 - .h6

Apply heading sizes to any element without semantic heading tags

.h1 - Largest heading size

.h2 - Second level

.h3 - Third level

.h4 - Fourth level

.h5 - Fifth level

.h6 - Sixth level

.fs-* (Font Size)

Fluid font size utilities using the --fl (fluid level) system

.fs-xs - Extra small (--fl: -1)

.fs-base - Base size (--fl: 0)

.fs-s - Small heading (--fl: 1)

.fs-m - Medium (--fl: 2)

.fs-l - Large (--fl: 3)

.fs-xl - Extra large (--fl: 4)

.fs-xxl - Double extra large (--fl: 5)

.fs-xxxl - Triple extra large (--fl: 6)