css-doodle is a browser web component for creative coding with CSS. You define grid cells, randomness, and math to draw patterns, backgrounds, and decorative graphics.
Overview
css-doodle packages generative visual work as a standard web component you embed in pages. You write CSS rules on a grid of cells, mix in random values and expressions, and build patterns, icons, and backgrounds without leaving the stylesheet language.
The project ships supporting tools such as a browser playground for sharing sketches, a shapes explorer for polygon discovery, and an SVG playground that reuses the same syntax. Articles and conference talks document how authors use @grid, @size, random helpers, and related features in real demos.
Because it runs in the page as a component, it fits landing pages, demos, and small interactive art pieces. Editor and build workflows can compile or bundle it like other front-end dependencies.
The library is MIT licensed and accepts community backing through Open Collective.
Key features
- Custom element for CSS art
- Grid-based generative rules
- Random and math expressions
- Browser playground
- SVG syntax helpers
- Shape discovery tooling
- MIT license
- Community articles and talks
Use cases
- Generative web backgrounds
- CSS pattern experiments
- Creative coding demos
- Shared doodle sketches
- SVG generation from CSS