-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
CSS validation: :global(...) must contain a single selector
error when using Svelte with Tailwind
#7079
Comments
:global(...) must contain a single selector
error is too eager
:global(...) must contain a single selector
error is too eager:global(...) must contain a single selector
error when using Svelte with Tailwind
I feel like this might be more something for svelte-preprocess's handling of |
thank you for the quick response Conduitry. Perhaps another way to do this is to make some sort of API in Sveltekit to have a smoother path for adding Tailwind, as i'm sure nobody is entirely happy with this hacky i'd be ok transferring it to the sveltekit repo if you agree, but i will volunteer that when i first ran into this issue, i came here first to search if anyone else had come across this issue yet. must be a newish thing since tailwind typography hasnt been out that long. for now: i ripped out tailwind from the whole bundler chain, and just built the thing in a separate process myself. i think ok for small projects like mine, but most people will want an all-in-one-build-step solution. |
I saw many people recommend doing |
HMMM. just saw you dummdidumm. giving it a shot. |
holy crap... it worked 🤦🏽 thank you thank you we need to change all the Tailwind + Svelte blogposts out there asap, this is so much nicer than the |
I was thinking just that when I was reading this issue messages. This is the way svelte-add/tailwindcss does it |
That's what Svelte Add is; it's even mentioned during |
Describe the bug
not that i demand Svelte to be compatible with Tailwind Typography but... its gonna be popular and i figure it might raise something that is worth tackling.
a popular way of including Tailwind is by including it inside of a layout component:
this wraps ALL THE THINGS in :global. this is not good for something like Tailwind, because this happens with Tailwind's popular typography plugin:
creates the error
:global(...) must contain a single selector
.Reproduction
https://svelte.dev/repl/d5e49cea12eb448e84f711eb43570c36?version=3.44.3
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: