atinux / content-wind

A lightweight Nuxt theme to build a Markdown driven website. Powered by Nuxt Content, TailwindCSS and Iconify.
https://content-wind.nuxt.space
MIT License
791 stars 55 forks source link

How would I enable TailwindCSS Intellisense? #27

Closed jjaimealeman closed 1 year ago

jjaimealeman commented 1 year ago

I ran npx tailwindcss init and it generates tailwind.config.js.

I put this in there:

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: ["./content/**/*.md"],
  theme: {
    extend: {},
  },
  plugins: [],
}

and expected TailwindCSS Intellisense to "just work", but it's not 🤔

Anyone have a solution?

jjaimealeman commented 1 year ago

In file content/1.index.md

If I enter some html like so <a class="bg-emerald-500 text-3xl">test</a> Intellisense works fine,

but it doesn't work with [test]{.text-gray-500.bg-orange-500.text-2xl}

🤔

atinux commented 1 year ago

Does it work with [test]{class="text-gray-500"} ?

Anyway I won't recommend to use Tailwind classes in the Markdown for better readability but use Component to wrap them.

Example:

Welcome to my :highlight[Website]
jjaimealeman commented 1 year ago

Negative, this also does not bring up Intellisense.

[test]{class="text-gray-500"}

I will stick with your recommendation 👍