How to use Tailwind Elements?
Hi!
I'd be interested in migrating from node-based Tailwind to Sail at work.
We use https://tailwind-elements.com/ as a plugin.
Specifically, our tailwind.config.js looks like this:
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [...],
theme: {
extend: {},
},
plugins: [require('tw-elements/dist/plugin')],
}
Is this something that Sail can reasonably provide? That would also help us assess the project in general.
Cheers - V
Hi @vemv!
It depends, based on whether you are defining the classes used in your Clojure(script) files - but I am guessing not?
The reason for this is that Sail reads keywords in Clojure(script) files e.g :div.p-4.rounded.bg-green-400 to determine which classes are used.
I am not very familiar with Tailwind Elements but I guess you import this into your Clojure files and use it as a library but no styling keywords are used (because they are all/mostly prewritten as part of the components?)
Thanks for trying out the project, at some point I'd like to expand this purging feature to pick up classes from strings in HTML e.g <body class="rounded bg-purple-100"> and you could probably generate the css using Sail from the output files in your process then but right now there's no ETA.
Best, Mike