We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
app.css
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
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:
I think it's best to stay aligned with the docs: https://tailwindcss.com/docs/installation/framework-guides/sveltekit
I'm not sure that we need to add an extra layer of indirection and alias for $app.css
$app.css
Sorry, something went wrong.
Agree. And since our current template is not scaffolding such a file, I don't think this currently necessary.
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: