fractalsvelte mascot fractalsvelte fractalsvelte

Styling system

fractalstyler

A composition styling system, shipped as plain CSS and as editable Sass. The class registry is the public API: compose in markup, write no stylesheet.

v1.2.0 MIT Published 10 Oct 2026

Install

pnpm add -D @fractaldesign/fractalstyler sass

@fractaldesign/fractalstyler — Classes, tokens, CLI, linter and MCP server.

Quick start

src/app.sass
@use '@fractaldesign/fractalstyler/styles' as *
or, without Sass
import '@fractaldesign/fractalstyler/css';
Compose in markup
<div class="row ycenter xbetween gap-sm pad-md bg-surface border radius-md">
	<span class="text-md weight-600">Fractalstyler</span>
	<button data-variant="primary" data-shape="modern">Continue</button>
</div>
[ At a glance ]
498 Classes
6 Layers
4 Preset axes
0 Runtime deps

Features

The registry is the API

Every class is listed, described and greppable. If a token exists, so does its class: --space-md becomes .gap-md, .pad-md and .mar-md.

x is always horizontal

Alignment modifiers sit on .box, .row and .grid and keep their meaning when you flip a container from column to row.

Grids that step through divisors

.grid-6 goes to three, then two, then one. Never five, never a row left holding a single card.

Plain CSS or editable Sass

Import the compiled stylesheet with no toolchain, @use the Sass layers, or eject them into your project and own every line.

Presets as data attributes

Size, shape, variant and padding are data-* axes. Sweep them across a page at runtime with one function call.

A contract your agent is held to

A linter that rejects invented class names, an MCP server over the registry, and an agent skill on disk.

Guides

README

@fractaldesign/fractalstyler@1.2.0 README, from npm.