django-crispy-forms / crispy-tailwind

A Tailwind template pack for django-crispy-forms
MIT License
331 stars 56 forks source link

crispy-tailwind CSS is not load to main CSS #101

Open shahriar350 opened 3 years ago

shahriar350 commented 3 years ago

I use Django-tailwind with crispy-tailwind but after rendering the form, input CSS is not extract to main.css. That's why input field don't apply CSS properly. How to extract crispy input CSS to main CSS when Django-tailwind compiling CSS.

smithdc1 commented 3 years ago

Unfortunately I don't know Django-tailwind. I would suggest that you'll likely get a better response though asking in stack overflow, there are far more folk looking at that site than here. 👍

andreashhpetersen commented 2 years ago

You need to tell django-tailwind to compile css classes in your python files (eg. forms.py). Assuming you have followed the installation instructions of django-tailwind, you should uncomment this line from theme/static_src/tailwind.config.js:

module.exports = {
    contents: [
        ...
        /**
        * Python: If you use Tailwind CSS classes in Python, uncomment the following line
         * and make sure the pattern below matches your project structure.
         */
        '../../**/*.py'
],
....