sass wont let me use css min()
See original GitHub issueI have css code like this:
–min: 250px; width: min( var(–min), 100%);
Sass breaks with error: Error: “var(–card-min)” is not a number for `min’
I think its trying to use some function called min and not css min. How can i tell it to not do this or ignore sass for this line?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:19 (6 by maintainers)
Top Results From Across the Web
When Sass and New CSS Features Collide
This is because Sass has its own min() function, and ignores the CSS min() function. Plus, Sass cannot perform any sort of computation...
Read more >How to Use Sass with CSS - freeCodeCamp
To do this, the compiler will generate a file with the CSS code. This transformation is called compilation.
Read more >Sass Basics
The most direct way to make this happen is in your terminal. Once Sass is installed, you can compile your Sass to CSS...
Read more >min() - CSS: Cascading Style Sheets - MDN Web Docs
Syntax. The min() function takes one or more comma-separated expressions as its parameter, with the smallest (most negative) expression value ...
Read more >Deprecating Sass for Shopify Themes
css file will be updated with this change. Using these automation tools to compile your .scss files will allow you to access the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If anybody is getting this issue you can simply bypass the Sass min() or max() function capitalizing them. It won’t be recognized by Sass compiler, but it’ll continue working on CSS.
e.g. Instead of using
font-size: min(1.3vw, 17px);
You write it asfont-size: Min(1.3vw, 17px);
This was annoying me a lot (in Dart Sass 1.26.3), since it was making the use of CSS min/max functions really unreliable, so I created a Sass function to force the CSS functions. Use them if you’d like.
You might still need to use
#{ }
interpolation when using Sass variables and CSS variables combined with them though, in some cases, to make sure Sass parses them properly. So: