Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.2K
Views
Deprecation Warning: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0

In this function I compile rem to px and em to px.

$base: 16 !default;
    
    @function scut-strip-unit ($num) {
      @return $num / ($num * 0 + 1);
    }
    
    @function rem ($pixels) {
      @return scut-strip-unit($pixels) / $base * 1rem;
    }
    @function em ($pixels, $context: $base) {
        @return #{$pixels/$context}em;
      }

But with sass v1.49, we are facing this error:

    Error
    Deprecation Warning: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.
    
    Recommendation: math.div(scut-strip-unit($pixels), $base) or calc(scut-strip-unit($pixels) / $base)
    
    More info and automated migrator: https://sass-lang.com/d/slash-div
    
      ╷
    8 │   @return scut-strip-unit($pixels) / $base * 1rem;
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

What it's saying is that you should be using the math.div from sass:math to make divisions, like so:

@use "sass:math";

@function to-rem($pxNb) {
    @return math.div($pxNb, 16) * 1rem;
}
over 4 years ago · Santiago Trujillo Report

0

To avoid using sass:math, you may just use

calc(scut-strip-unit($pixels) / $base)
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!