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 comment in :global Sass declaration compiles incorrectly #136

Open
reintroducing opened this issue Jun 7, 2022 · 5 comments
Open

Comments

@reintroducing
Copy link

Given the following code:

:global {
  /*
   * Add the correct display in all browsers.
   */
  summary {
    display: list-item;
  }
}

Sass compiles this into:

:global {
  /*
    * Add the correct display in all browsers.
    */
}
:global summary {
  display: list-item;
}

postcss + postcss-modules compiles it to:

{
  /*
    * Add the correct display in all browsers.
    */
}
summary {
  display: list-item;
}

Reproduction here: https://stackblitz.com/edit/node-2pmbyx?file=sass.js,postcss.js

Original Vite bug where this was found: vitejs/vite#8480

@reintroducing reintroducing changed the title Multiline comment in :global declaration compiles incorrectly Multiline comment in :global Sass declaration compiles incorrectly Jun 7, 2022
@ccqgithub
Copy link

any news?

@lake2
Copy link

lake2 commented Aug 7, 2022

same issue + 1

@donghoon-song
Copy link

same + 1

1 similar comment
@gaeundev
Copy link

same + 1

@MatissAndersons
Copy link

Had the same warning and didn't like having it. Workaround to keep comments and not get a warning, found this to be working for me:

html :global {
   /*...*/
}

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

6 participants