@theme-ui/tailwind
Generate static CSS for use outside of React with Theme UI and Tailwind.css.
Why?
Though Theme UI comes with its own implementation, project constraints might require pure utility CSS output. This library allows you to leverage a Theme UI theme that is used elsewhere and transforms it to the configuration that Tailwind expects. The best of both worlds.
Installation
npm i @theme-ui/tailwind
Usage
Transform your Theme UI compliant theme config with the library:
// tailwind.config.jsconst toTailwind = require('@theme-ui/tailwind')const theme = require('./theme') // Path to Theme UI configmodule.exports = toTailwind(theme)
Then, use the Tailwind CLI:
Edit the page on GitHubtailwind build input.css -o output.css