npm -v): 6.4.1node -v): v10.10.0node -p process.versions):node -p process.platform): darwinnode -p process.arch): x64node -p "require('node-sass').info"):node-sass 4.13.0 (Wrapper) [JavaScript]
libsass 3.5.4 (Sass Compiler) [C/C++]
npm ls node-sass): [email protected]Repro CSS:
h1 { font-size: max(1vw, 20px); }
Error:
[0] {
[0] "status": 3,
[0] "message": "Incompatible units: 'vw' and 'px'.",
[0] "formatted": "Internal Error: Incompatible units: 'vw' and 'px'.\n"
[0] }
It seems legit CSS according to https://developer.mozilla.org/en-US/docs/Web/CSS/max
This is only supported in dart-sass https://sass-lang.com/documentation/syntax/special-functions#min-and-max
You need to use string interpolation (similar to CSS variables) for this to work outside of dart-sass
h1 { font-size: #{"max(1vw, 20px)"}};
Ahh I see.
For posterity, it seems that also calc(max(1vw, 20px)) works.
Closing as a workaround is available (maybe the error message could give some better clues though)
Ahh I see.
For posterity, it seems that alsocalc(max(1vw, 20px))works.
Closing as a workaround is available (maybe the error message could give some better clues though)
thank you
Most helpful comment
Ahh I see.
For posterity, it seems that also
calc(max(1vw, 20px))works.Closing as a workaround is available (maybe the error message could give some better clues though)