Search code examples
csstailwind-csstailwind-ui

Tailwind css design concept and implementation


My team manager wants to implement Tailwind CSS for the first time in the project and I am new to tailwind css The project has some vanilla CSS files so my question is do I need to write afresh tailwind css stylesheets right from the scratch or is there a better solution ..please advise

I tried converting old vanilla css files to tailwind using command npx tailwindcss -i input.css -o output.css but its not helpful


Solution

  • The command you mentioned npx tailwindcss -i input.css -o output.css is to generate vanilla CSS from tailwindcss's utility classes, not to the reverse.

    tailwind, in the end, is just a CSS file and you can have multiple CSS files in your project but to avoid conflicts use prefix Eg: "tw-" in your tailwind.config.js, so that it generates classes as tw-bg-black

    // tailwind.config.js
    module.exports = {
       prefix: 'tw-',
    }