Replies: 4 comments 2 replies
-
The output of Tailwind is standalone CSS, so you could mock things up with Tailwind in a tool like https://play.tailwindcss.com/, Codepen, etc, and then copy the generated styles via the browser inspector (in those two examples it's in a
Additional work will need to be done for email, to inline styles where necessary and to not rely on custom properties. |
Beta Was this translation helpful? Give feedback.
-
|
You could create a simple web project using Vue, React, or whatever with markup representing the various design tokens you want (buttons, headers, etc.), each with their own class. Use This also gives you a way to tweak the styling later and easily test how it works with some sample content. Free bonus: by using autoprefixer, etc., and a good browserlist setting, you can let PostCSS handle some of details of making those styles compatible with more email clients. |
Beta Was this translation helpful? Give feedback.
-
|
Hi! Little late to the party but I built a free online Tailwind CSS to CSS converter tool that does exactly this! You can paste your HTML snippet with tailwind classes (full file or just the part you want), and it automatically converts those classes into plain CSS. It also updates your HTML with the new classes. Totally free, no account, no payment, no tracking or storing of your information whatsoever. Saw that people were asking for something like this so I decided to create it myself, no strings attached. Hope it helps! 👉 Try it here: Tailwind to CSS Converter – Free Online Tool For those curious on how it works, it uses Tailwind's own compiler to make sure the conversion works as intended every time. It creates a new class for each HTML element to accurately track responsiveness, focus, dark modes, etc. |
Beta Was this translation helpful? Give feedback.
-
|
@raquel-f just solved this lol. looks like there are a few ways to do it now.
the new tool is the real fix tho. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I found few CSS to tailwind converters like https://transform.tools/css-to-tailwind and https://tailwind-converter.netlify.app/ but is there any tool which provide the reverse?
Suppose, I put a div with tailwind classes and the tool spits out the standalone CSS. This CSS I can copy paste to other non-tailwind projects.
One more use case is designing emails, tailwind is my homie so I design with it and would love to get the output as classic old html and CSS.
can I do it easily in VSCode if there are no online tools as such?
Beta Was this translation helpful? Give feedback.
All reactions