2023-10-16


Using UnoCSS with Tailwind extension
I really like UnoCSS but prefer the Tailwind extension because I find it has better intellisense and a bit better performance. Here’s how to use the Tailwind extension together with UnoCSS:
  1. Install the Tailwind extension in VSCode.
  2. Install the Tailwind package as a dev dependency. npm i --save-dev tailwindcss note that we’re not really using it, this is just for the extension to start.
  3. Add a tailwind.config.js (or .ts) file:
/** @type {import('tailwindcss').Config} */
module.exports = {
  content: ["./src/**/*.{html,js,svelte}"],
};
That’s it!
Go back to all posts