thgh / rollup-plugin-scss

Rollup and compile multiple .scss, .sass and .css imports
MIT License
134 stars 47 forks source link

spaces are removed inside calc, if used on property #67

Closed yairEO closed 3 years ago

yairEO commented 3 years ago

Hi, I came across a very bizarre thing:

Setup:

scss({ output: false, watch: 'src/styles', })

Below CSS:

opacity: calc(var(--a) - var(--b));

Results in an invalid CSS calc due to the lack of whitespace between the mathematical operation:

    opacity: calc(var(--a)-var(--b));

Weirdly, this does not happen here:

-foo: calc(var(--a) - var(--b));
opacity: var(-foo);

Seems to work ok in sassmeister so I thought it might be specifically related to this package.

thgh commented 3 years ago

This package does not transform css. It's probably related to node-sass or sass.

yairEO commented 3 years ago

I know it does not transform sass to css but maybe it does some afterwards manipulation of some sort that removes those spaces.. it's weird because this behaviour only happens with rollup-plugin-scss