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

Multiline class attribute value breaks svelte #4242

Closed
kreativ-los opened this issue Jan 10, 2020 · 3 comments · Fixed by #4286
Closed

Multiline class attribute value breaks svelte #4242

kreativ-los opened this issue Jan 10, 2020 · 3 comments · Fixed by #4286
Labels

Comments

@kreativ-los
Copy link

Describe the bug
At my team we spread classes into multiple lines when there are more than two classes to make it more readable. This breaks svelte.

<div
  class="
    foo
  "
>
</div>

<style>
  .foo {
    background: red;
  }
</style>

Logs

ERROR in ./src/_components/Foo.svelte
Module Error (from ./node_modules/eslint-loader/dist/cjs.js):

[...]/_components/Foo.svelte
  9:3  warning  Unused CSS selector  css-unused-selector

To Reproduce
To reproduce just spread the classes named in the value of the class attribute into multiple lines, like in this REPL https://svelte.dev/repl/b85c17a37a0547f58f1bd221ae4bd8bc?version=3.16.7

<div
  class="
    foo
  "
>
</div>

<style>
  .foo {
    background: red;
  }
</style>

Expected behavior
Components are working as classes weren't written in multiple lines.

@ghost
Copy link

ghost commented Jan 13, 2020

This look real similar to #4240

@Conduitry
Copy link
Member

This was broken by me in #3552. Fix coming shortly.

@Conduitry
Copy link
Member

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