Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.2K
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

0

To avoid using sass:math, you may just use

calc(scut-strip-unit($pixels) / $base)
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda