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
big saf 🍉
big saf 🍉OP12mo ago
Anyone?
Jochem
Jochem12mo ago
share the code you're trying to compile and the exact error, otherwise it's just staring into a crystal ball
big saf 🍉
big saf 🍉OP12mo ago
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 reduced
Jochem
Jochem12mo ago
sass 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
big saf 🍉
big saf 🍉OP12mo ago
It was warning about incompatible units I'm using sass version 1.64.2
Jochem
Jochem12mo ago
some googling suggests that sass has a different min implementation. You can either use unquote to use the css version:
padding: unquote("min(100vw, 10rem)");
padding: unquote("min(100vw, 10rem)");
or use a different capitalization because CSS is case insensitive, while SCSS is case sensitive:
padding: MIN(100vw, 10rem);
padding: MIN(100vw, 10rem);
big saf 🍉
big saf 🍉OP12mo ago
I will try it Thanks that worked
Want results from more Discord servers?
Add your server