I cannot compile my sass code?
I am trying to use the min() method in my scss but I get a compile error? Cannot use the properties...
Does sass support it or do I need to upgrade something?
7 Replies
Anyone?
share the code you're trying to compile and the exact error, otherwise it's just staring into a crystal ball
On top of my head it's
padding: min(100vh, 10em);
I'm trying to do the padding squish style where on the desktop there's about 120px padding top and bottom
But on mobile of course that would be too big so the padding should be reducedsass seems to support min just fine: https://sass-lang.com/documentation/values/calculations/
but without the exact error you're getting, it's hard to troubleshoot
Sass: Calculations
Syntactically Awesome Style Sheets
It was warning about incompatible units
I'm using sass version 1.64.2
some googling suggests that sass has a different min implementation. You can either use unquote to use the css version:
or use a different capitalization because CSS is case insensitive, while SCSS is case sensitive:
I will try it
Thanks that worked