We've moved discussions to Discord

does Tailwind work the same on the Administrate side of JSP?

John Quarto-vonTivadar
I have some custom colors (in tailwind.config.js) and @apply directives in a .scss file which work just fine in the front side of JSP.  But in the Administrate backend they are ignored. No error of course, just silently ignored. Can someone suggest why that could be the case 

the .scss file is imported by both the application.js pack file as well as the administrate.js pack file (though I think that would only explained the ignoring of the @apply directives) . This is imported in both cases right after base, components, and utilities
John Quarto-vonTivadar
How to fix, depending on your version of JSP:

In my version of JSP, the Administrate application.html.erb layout file included its own css file but not the one from the main (non-admin) side.  My fix was to add a stylesheet_pack_tag 'application' to the layout file. Things worked fine , though there was a bit of a change to the width of my Administrate backend and the font size seemed one step further. Not enough for me to care much about. YMMV

In newer (post summer 2021 ?) versions of JSP, which integrates more of Tailwind 2.2 and later Tailwind 3, this may not be an issue since there are instructions in the JS & CSS files for what to do when you want Tailwind to dominate your Administrate backend.

Hope this helps someone
Notifications
You’re not receiving notifications from this thread.