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

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

Open
shahriar350 opened this issue Jul 8, 2021 · 2 comments
Open

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

shahriar350 opened this issue Jul 8, 2021 · 2 comments

Comments

@shahriar350
Copy link

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.

@shahriar350 shahriar350 changed the title cripsy-tailwind css is not load to main css crispy-tailwind CSS is not load to main CSS Jul 8, 2021
@smithdc1
Copy link
Member

smithdc1 commented Jul 8, 2021

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
Copy link

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'
],
....

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

3 participants