Description
.foo {
--some-var: ;
}
CSS variables can be set to "nothing". There is some discussion about having some more explicit syntax for it (w3c/csswg-drafts#10441), but right now the only way to do so it to literally put nothing in the value. You can read more about the use cases at https://css-tricks.com/the-css-custom-property-toggle-trick/.
PDF.js, a popular library for rendering PDFs in the browser, recently started relying on it (mozilla/pdf.js#19879). It did so indirectly, through the PostCSS transform to polyfill the CSS light-dark()
function (https://github.com/postcss/postcss-dark-theme-class), which injects this code:
@media (prefers-color-scheme: dark){
:root{
--csstools-color-scheme--light:;
}
}
SASS cannot parse that code.
This issue is conceptually similar to #3245: that one was about the CSS variable fallback being set to nothing, while this one is about the declaration.
I'm happy to submit a PR.