Option to off auto inject to global css

This issue has been tracked since 2022-10-11.

Is your feature request related to a problem? Please describe.

No.

Describe the solution you'd like

An ability to set an option to disable auto inject to global css.

Describe alternatives you've considered

If not an option, then could I inject css to only specific layouts or pages?

Additional context

injectPosition

This option lets you adjust the position of the global CSS injection, which affects the CSS priority. You can use multiple formats to define the position:

https://tailwindcss.nuxtjs.org/getting-started/options#injectposition

Atinux wrote this answer on 2022-10-12

I believe Tailwind needs to be injected globally to work, but you can try by giving a cssPath property to an empty css file and add the Tailwind directives in your layout.

younho9 wrote this answer on 2022-10-12

Thanks! Giving a cssPath property to empty css file works.

I also think Tailwind needs be be injected globally. But I am incrementally applying tailwind to applications with vast amounts of legacy global stylesheets with naming collision problems.

Giving empty css file works but, it would be nice to have an option.

Atinux wrote this answer on 2022-10-12

Feel free to open a PR to add the option to set cssPath to false

More Details About Repo
Owner Name nuxt-modules
Repo Name tailwindcss
Full Name nuxt-modules/tailwindcss
Language TypeScript
Created Date 2019-04-04
Updated Date 2023-03-29
Star Count 1285
Watcher Count 12
Fork Count 157
Issue Count 57

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date