Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use Tailwind PostCSS @apply function in component <style> in v3 #3711

Closed
MarkYarchak opened this issue Mar 28, 2025 · 1 comment
Closed
Labels
question Further information is requested v3 #1289

Comments

@MarkYarchak
Copy link

Description

Appreciate your work over nuxt/ui.

Based on tailwind docs, after migrating to v4 (which nuxt/ui@3 uses), @apply doesn't work in components anymore.
Are there any hacks regarding this or migration tips as it can take forever to replace everything manually?

Tailwind update docs
https://tailwindcss.com/docs/upgrade-guide#using-apply-with-vue-svelte-or-css-modules

@MarkYarchak MarkYarchak added question Further information is requested v3 #1289 labels Mar 28, 2025
Copy link
Member

You actually posted the solution 😅 You have to use @reference:

<style>
@reference "../assets/css/main.css";
</style>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested v3 #1289
Projects
None yet
Development

No branches or pull requests

2 participants