This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
calc() is being evaluated and the result is being outputted to CSS instead of the calc() function being outputted to CSS #2144
Labels
Milestone
npm -v
): 3.10.10node -v
): 6.12.0node -p process.versions
): { http_parser: '2.7.0',node: '6.12.0',
v8: '5.1.281.108',
uv: '1.15.0',
zlib: '1.2.11',
ares: '1.10.1-DEV',
icu: '58.2',
modules: '48',
openssl: '1.0.2m' }
node -p process.platform
): ormdarwin
node -p process.arch
): x64node -p "require('node-sass').info"
): node-sass 3.13.1 (Wrapper) [JavaScript]libsass 3.3.6 (Sass Compiler) [C/C++]
npm ls node-sass
): 3.13.1We have a Sass function and mixin that responsively changes the font size based on viewport width. It does this by calculating a constant rate of change and then outputting a calc() value that is essentially calc(Xvw + Yrem). The key is that the css is a calc() with the vw in it so that it can constantly be evaluating the font size based on the viewport width and changing accordingly. Our function worked great when we were using node v4.2.2 (npm v3.8.6) but not on node version 6 or 7. Instead, the calc() will be evaluated and then a static value will be outputted to the stylesheet (say font-size: 4.25rem; instead of the desired font-size: calc(1.4vw + 2.64rem); or whatever).
I would expect the calc() to be outputted to the stylesheet instead of being evaluated and then the result being outputted.
The text was updated successfully, but these errors were encountered: