Skip to content

timhanlon/tailwind-worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tailwind Worker

Get a production-ready Tailwind v4 stylesheet, including the typography (prose) plugin, without a build step.

If you're building a multi-tenant application, or something like a WYSIWYG editor, you may find this useful.

Deploy to Cloudflare

pnpm run deploy

Example POST requests

Just a list of classes:

{
  "classes": ["p-2", "flex", "flex-col", "gap-2"]
}

Include the @tailwindlabs/typography plugin:

{
  "classes": ["p-2", "flex", "flex-col", "gap-2", "prose", "prose-slate"],
  "include": ["typography"]
}

Include a theme:

{
  "classes": [
    "font-serif",
    "text-neon-green",
    "text-xl",
  ],
  "theme": "@theme { --font-serif: \"Merriweather\", \"serif\"; --font-sans:\"SpaceGrotesk\", \"sans-serif\"; --neon-green: oklch(0.8493 0.2073 128.85);} @theme inline { --color-neon-green: var(--neon-green); }"
}

About

Tailwind v4 CSS compilation as a Cloudflare Worker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors