← playground

css model

Describe a look, get modern CSS. This is not an API call — it's a tiny specialty model (a 28-intent classifier trained on synthetic prompts, ~160 kb of weights) compiled from Rust to WebAssembly, running entirely in this tab. The same idea as the LLM-backed CSS generators, minus the key, the cost, and the latency.

loading model…

preview

Card title Describe a style above and the model restyles this element.

css

/* generated css shows up here */
how it works

A one-vs-rest logistic-regression model scores 28 style intents (glassmorphism, neubrutalism, neon, pill shape, hover-lift…) over hashed word and character n-grams of your prompt. Colors and the target element are extracted deterministically, then a Rust CSS synthesizer composes the winning intents into a stylesheet — color-mix(), backdrop-filter, keyframes, a prefers-reduced-motion guard. The model was trained on ~12k synthetic prompts; trainer and inference share the same Rust featurizer, so there's no train/serve skew. Source lives in packages/css-model.