Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

1.2K
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

0

To avoid using sass:math, you may just use

calc(scut-strip-unit($pixels) / $base)
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda