postcss-modules
postcss-modules copied to clipboard
Multiline comment in :global Sass declaration compiles incorrectly
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: https://github.com/vitejs/vite/issues/8480
any news?
same issue + 1
same + 1
same + 1
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 {
/*...*/
}