Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How Can we configure tailwindCSS in PawJS version ^3.0.2-beta.17? #123

Open
mayurLinerloop opened this issue Jul 22, 2024 · 1 comment
Open

Comments

@mayurLinerloop
Copy link

Currently working with "3.0.2-beta.17" version of Paw.js and i am trying to configure tailwindCSS into it. after configuration didn't get any error but tailwind classes not working.

I have followed below steps for implement tailwindCSS:

  1. Add packages: tailwindcss, postcss, autoprefixer
  2. Create new file called: "postcss.config.js"
import tailwindcss from 'tailwindcss';
import path from 'path';
import autoprefixer from 'autoprefixer';

module.exports = {
  plugins: [
    // ...
    tailwindcss(path.resolve(__dirname, 'tailwind.config.js')),
    autoprefixer,
  ],
};

  1. Create new file called: "tailwind.config.js"
module.exports = {
  content: ['./src/**/*.{js,jsx,ts,tsx}'],
  theme: {
    colors: {
      red: '#ff0000',
    },
    extend: {},
  },
  plugins: [],
};
  1. Create new file called: "styles/style.css"
@tailwind base;
@tailwind components;
@tailwind utilities;

  1. Called new css file in client.js like this: import './styles/style.css';
  2. Add class "text-red" on div tag
@mayurLinerloop
Copy link
Author

Hello @tirthbodawala,
Hope you are doing well,

Can you please give a update on it?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant