Skip to content
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

:global(...) must contain a single selector #2

Closed
jimafisk opened this issue Jul 7, 2021 · 0 comments
Closed

:global(...) must contain a single selector #2

jimafisk opened this issue Jul 7, 2021 · 0 comments

Comments

@jimafisk
Copy link
Contributor

jimafisk commented Jul 7, 2021

We recently updated the version of Svelte that ships with Plenti core, and now if you delete your npm dependencies (rm -R node_modules) and rebuild (plenti serve) you will see the following error:

Building... 2021/07/07 12:08:23 errs.go:55: can't compile component file layouts/style/global.svelte with Svelte: :global(...) must contain a single selector (2:2)
1: <style>
2:   :global(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) {
     ^
3:     color: #222;
4:     font-family: lato,sans-serif; /home/jimafisk/Projects/jantcu/plentico/plenti/cmd/build/compile.go on line 77

 /home/jimafisk/Projects/jantcu/plentico/plenti/cmd/build/client.go on line 176

can't compile component file layouts/style/global.svelte with Svelte: :global(...) must contain a single selector (2:2)
1: <style>
2:   :global(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) {
     ^
3:     color: #222;
4:     font-family: lato,sans-serif; /home/jimafisk/Projects/jantcu/plentico/plenti/cmd/build/compile.go on line 77

javascript stack trace: ValidationError: :global(...) must contain a single selector
    at error (compile_svelte:16758:20)
    at Component.error (compile_svelte:29042:10)
    at Selector$1.validate (compile_svelte:27878:36)
    at compile_svelte:28375:23
    at Array.forEach (<anonymous>)
    at Rule$1.validate (compile_svelte:28374:25)
    at compile_svelte:28656:20
    at Array.forEach (<anonymous>)
    at Stylesheet.validate (compile_svelte:28655:24)
    at new Component (compile_svelte:28834:26)
Total build took 1.065685591s

This error is related to the fixing of this bug: sveltejs/svelte#5907

Here's a video with more details for the fix: https://youtu.be/kmCzxCTNTR8?t=100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant