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
When compiling e.g. clamp(0.2rem, 0.2rem + 0.12vw, 0.3rem) the Compiler fails in the method compileString() line 573 with the message Incompatible units vw and rem.: line: <line-number>, column: <column-number>.
It works when using clamp(0.2rem, calc(0.2rem + 0.12vw), 0.3rem) but calc() is optional ,see https://web.dev/min-max-clamp/
When using a calculation inside of a min(), max(), or clamp() function, you can remove the call to calc(). For example, writing font-size: max(calc(0.5vw - 1em), 2rem) would be the same as font-size: max(0.5vw - 1em, 2rem).
The text was updated successfully, but these errors were encountered:
We haven't implemented support for first-class calc yet in scssphp (doing that in our 1.x codebase is too hard, so this is scheduled to be part of the upcoming 2.0 release, once I have time again to move it forward). Because of that, 0.2rem + 0.12vw is interpreted as a Sass addition. Wrapping it in calc() works because calc() has a special parsing.
When looking at the compatibility notes in the documentation about calculations, the support in scssphp 1.x is equivalent to the support in libsass.
When compiling e.g.
clamp(0.2rem, 0.2rem + 0.12vw, 0.3rem)
theCompiler
fails in the methodcompileString()
line 573 with the messageIncompatible units vw and rem.: line: <line-number>, column: <column-number>
.It works when using
clamp(0.2rem, calc(0.2rem + 0.12vw), 0.3rem)
butcalc()
is optional ,see https://web.dev/min-max-clamp/The text was updated successfully, but these errors were encountered: