Replies: 2 comments
-
Thanks! I think it's too specific to include as a default inside LiveSvelte, it's more of a personal configuration thing instead of a core feature as not everyone wants to define tailwind utility classes inside Svelte. And if people want it they can configure it themselves with the guide you provided :) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Actually, using @apply in Svelte files is a bad idea |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
DO NOT do this!
Using @apply in Svelte files considered harmful.
In a .svelte file, I want to use Tailwind utility classes
For example:
What I did
I found a hint.
build.js:
This requires:
npm --save-dev tailwindcss @tailwind/forms autoprefixer
Caveat
The above works. However, classes that contain semicolons such as focus:outline-none generate errors.
Solution: add lang="scss" attribute to <style>:
This requires:
npm --save-dev postcss sass
Beta Was this translation helpful? Give feedback.
All reactions