npm.io
0.70.1 • Published 2d ago

css-doodle

Licence
MIT
Version
0.70.1
Deps
0
Size
759 kB
Vulns
0
Weekly
0
Stars
6.1K

houses, drawn with css-doodle

css-doodle

A web component for visual art and creative coding with CSS. Write CSS rules for a grid of cells, mix in randomness and math, and draw generative patterns, backgrounds, icons and decorations.

npm MIT license Open Collective backers

Website · Getting started · Reference · Playground · Discover

Example

The code <css-doodle> @grid: 4 / 480px / blue +.75; border-radius: @pn(100% 0, 0 100%, 50%); background: #fff; </css-doodle> next to its result, a 4 by 4 grid of white leaf shapes and circles on blue

Tools

  • Playground: write and share doodles in the browser
  • Shapes: discover new CSS polygon shapes
  • SVG playground: generate SVG code with the same syntax
  • cssd: command-line preview and image/video export

Articles and talks

Who uses css-doodle

  • Tabbied: generated patterns for prints and wallpapers

Development

npm install
npm test         # unit tests
npm run build    # css-doodle.min.js

make runs both.

Support

css-doodle is free and MIT licensed. If it has been useful to you, consider backing it on Open Collective. Thank you!

Keywords