From bc6aa8aa795756b69149bdde23f50e93c428d908 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 24 Feb 2025 16:41:30 -0800 Subject: [PATCH] Add a regression test for sass/dart-sass#2523 --- .../values/calculation/round/one_argument.hrx | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/spec/values/calculation/round/one_argument.hrx b/spec/values/calculation/round/one_argument.hrx index 4d41fe726..ab8af34e1 100644 --- a/spec/values/calculation/round/one_argument.hrx +++ b/spec/values/calculation/round/one_argument.hrx @@ -135,6 +135,32 @@ DEPRECATION WARNING [slash-div]: Using / for division outside of calc() is depre Recommendation: math.div(2px, round(1.5)) or calc(2px / round(1.5)) +More info and automated migrator: https://sass-lang.com/d/slash-div + + , +2 | a: 2px / round(1.5); + | ^^^^^^^^^^^^^^^^ + ' + input.scss 2:6 root stylesheet + +<===> +================================================================================ +<===> calc_unsafe_in_binary_operator/input.scss +// Regression test for sass/dart-sass#2523 +b { + a: round(-(1) + 2); +} + +<===> calc_unsafe_in_binary_operator/output.css +b { + a: 1; +} + +<===> math/slash_as_division/warning +DEPRECATION WARNING [slash-div]: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0. + +Recommendation: math.div(2px, round(1.5)) or calc(2px / round(1.5)) + More info and automated migrator: https://sass-lang.com/d/slash-div ,