You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, flagging the style as global and importing 'tailwindcss' in every component I want to use @apply is not a reasonable solution.
The PR mentioned above also has a comment stating:
// In practice, it is not recommended to use `@tailwind utilities;` inside
// Svelte components. Use an external `.css` file instead.
However, this does not seem to work, as seen in the provided reproduction URL, where tailwind is imported by app.css and made available through +layout.svelte — as previously done with tailwind 3 + SvelteKit.
The text was updated successfully, but these errors were encountered:
What version of Tailwind CSS are you using?
tailwindcss: 4.0.0-beta.2
@tailwindcss/vite: 4.0.0-beta.2
What build tool (or framework if it abstracts the build tool) are you using?
svelte: 5.2.9
sveltekit: 2.8.5
What version of Node.js are you using?
v20.17.0
What browser are you using?
Chrome, Firefox
What operating system are you using?
Ubuntu 24.04
Reproduction URL
Public github:
https://github.com/lucas-subli/svelte-5-tailwind-4-beta
Describe your issue
This code:
Generates this result:
With this error:
@apply
inside svelte<style>
does not work properly.After this PR: #14151
The below will work:
However, flagging the style as global and importing 'tailwindcss' in every component I want to use
@apply
is not a reasonable solution.The PR mentioned above also has a comment stating:
However, this does not seem to work, as seen in the provided reproduction URL, where tailwind is imported by
app.css
and made available through+layout.svelte
— as previously done with tailwind 3 + SvelteKit.The text was updated successfully, but these errors were encountered: