-
Notifications
You must be signed in to change notification settings - Fork 57
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
Tailwind forms styling not applied correctly #110
Comments
I figured it out. I was running django-tailwind in JIT mode which only builds the css for what's in your templates. Switching to AOT mode builds the complete tailwind css. tailwind.config.js /**
* Stylesheet generation mode.
*
* Set mode to "jit" if you want to generate your styles on-demand as you author your templates;
* Set mode to "aot" if you want to generate the stylesheet in advance and purge later (aka legacy mode).
*/
mode: "aot", The forms are now styled correctly - except for the double down arrow on the select lists. Why is this happening?? |
@tobyporter I had the same problem. Go into your tailwind.config.js and comment out |
I guess this is an issue with this layout |
I had the same problem. Fixed it by overriding the
This new file will need to be saved at The following is the original code from
Also, the following should be in your template settings.
|
After tinkering around with the issue, I think this should be the solution. The issue is not with crispy-tailwind. The issue is coming form the form styling of django-tailwind. This tailwind.config.js file resides in theme/static_src directory. |
I'm not sure whether it's a crispy-forms issue or a django-tailwind issue. My fix was to
Longer description: This is the original crispy-form's template. Notice the superfluous
There's two things you can do when copying the above file to your own app templates directory.
That's what I did, and this is what the template in
|
there's a fix here that removes the SVG entirely: #112 I had success with copying and overriding the template to remove the extra |
The select works (now) AFAIK and we got some updates the other day on this widget. So, does anybody still has some things that should be tackled? Otherwise, I'd close this ticket soon. |
Hi
I've installed tailwind, crispy_forms & crispy_tailwind but the form styling doesn't seem to be working and I get huge SVG arrow appearing underneath.
settings.py
my_form_template.html
I've tried with/without the form tags and with/without
{% load crispy_forms_tags %}
- neither have any effect.Any ideas what I'm missing?
Thanks
The text was updated successfully, but these errors were encountered: