We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
app.css
There is a heated discussion related to using the @apply directive in a Svelte component:
@apply
Without the @reference directive, the following error occurs:
@reference
[plugin:@tailwindcss/vite:generate:serve] Error: Cannot apply unknown utility class: text-red-700
I personally believe this is the best workaround:
// svelte.config.js const config = { kit: { // ... alias: { '$app.css': './src/app.css' }, }, }; export default config;
<style> @reference "$app.css"; a { @apply text-red-700; } </style>
The ./src/app.css will be hard-coded to the Prettier config file as well, so I guess it can be safely aliased.
./src/app.css
tailwindcss
tailwindStylesheet
Note
I do understand that this is only needed for people using the @apply directive, but this seemed to be the desirable place to leave this content.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
There is a heated discussion related to using the
@apply
directive in a Svelte component:Without the
@reference
directive, the following error occurs:I personally believe this is the best workaround:
The
./src/app.css
will be hard-coded to the Prettier config file as well, so I guess it can be safely aliased.tailwindcss
add propertytailwindStylesheet
to prettier config when both are installed #507Note
I do understand that this is only needed for people using the
@apply
directive, but this seemed to be the desirable place to leave this content.The text was updated successfully, but these errors were encountered: