Twout
Tailwind Classes Output
Twout is a utility function that mimics how Tailwind generates styles and returns the corresponding CSS as a string.
Instead of relying on Tailwind’s build process, Twout lets you dynamically generate styles from class names — anywhere.
Why does this exist?
Tailwind is an amazing framework, but it has one limitation:
There is no official way to generate Tailwind’s output CSS dynamically outside of its build process.
Twout solves that.
Use cases:
- Create page-specific CSS instead of one global file
- Store Tailwind classes in CMS fields
- Generate Tailwind styles from APIs
- Apply styles dynamically from database-driven content
- Use Tailwind logic in non-standard environments
Posted in Development
ToolkitCSSCascading Style Sheets, it’s a coding language that adds style to a web page (colors, sizes, fonts, etc). Although all web projects have CSS, the ones I show here use vanilla CSS, which is easier to control on a page basis without Sass as preprocessor.TailwindTailwind is a utility-first CSS Framework, with a modern take that allows to never leave the HTML. It has a set of classes for all needs. During development all classes are available and when everything is ready for production, it builds the CSS file with only the necessary classes. Here are some of the projects where I used Tailwind:JavascriptFor developers