nuxt-modules / tailwindcss

Tailwind CSS module for Nuxt

Home Page:https://tailwindcss.nuxtjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to override default tailwind.css?

avxkim opened this issue · comments

I want to override @layers, @components inside tailwind.css, but i've checked documentation, and found no information on how to achieve that.

You could use a Tailwind plugin, or add your own assets/css/tailwind.css file for control:

@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';

@layer components {
}

@ineshbose can i add this tailwind.css while using this plugin same time?

Yes! You can do both; the plugin approach would be preferable due to the JS/CSS scoping.

https://tailwindcss.com/docs/plugins#adding-components

i see now, thanks. As i understood, we can just add our components using TW plugin inside tailwind.config.ts