Minus signs in SCSS are a little tricky. $a - $b is a subtraction, -$b is a negative value, and 1px 2px is a list. A formatter has to read every minus sign exactly the way Sass does, or it quietly changes your CSS.
That's what issue #12957 was about. The reporter had this:
$s : 8px ; .a { margin : - # { $s } - # { $s } - # { $s } auto ; }
Enter fullscreen mode
Exit fullscreen mode
and Biome formatted the value as -#{$s} - #{$s} - #{$s} auto . Looks like a spacing tweak. It isn't. The reporter checked with Dart Sass: the original compiles to margin: -8px -8px -8px auto; , the formatted file to margin: -8px-8px-8px auto; . That's invalid CSS, so the browser drops the whole declaration.
I picked it up, and the fix was merged in biomejs/biome#12983 .
Why it happened
The formatter wasn't really the problem. It prints the tree the parser gives it.…