Just a tip for people trying to get Tailwind worki...
# ktor
a
Just a tip for people trying to get Tailwind working in Ktor HTML templates. The out-of-the-box config works pretty much directly:
Copy code
/** @type {import('tailwindcss').Config} */
module.exports = {
  content: {
      files: [
          './src/main/kotlin/**/*.kt', 
      ]
  },
  theme: {
    extend: {},
  },
  plugins: [],
}
And my code I have this kotlinx.html code:
Copy code
div("text-3xl font-bold underline") {
        h1("") { +title }

        article {
            p { +"This is a blog post" }
        }
    }
And it works with:
Copy code
npx tailwindcss -i src/main/resources/tailwind/input.css -o src/main/resources/tailwind/styles.css
I couldn't find anything on the webz, so I just tried it out.
🔥 2
186 Views