You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
--some-var: ;is supported by Sass. It looks like support for --some- var:; was added to the spec after the fact, and we never caught up, but you're right that we should support it.
(Note: this doesn't require a spec update because we just follow the CSS spec here.)
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){
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.
The text was updated successfully, but these errors were encountered: