Increase strictness about whitespace around minus sign
Author: akaScooterCreated Nov 24, 2015Updated Apr 8, 2026
Labelsenhancementrequires deprecationblocked
Deprecation
- Tests (https://github.com/sass/sass-spec/pull/1823)
- Dart Sass (https://github.com/sass/dart-sass/pull/1800)
Removal
- Update deprecation (https://github.com/sass/sass/pull/4177)
- Tests (https://github.com/sass/sass-spec/pull/2102)
- Dart Sass (https://github.com/sass/dart-sass/pull/2718)
- Documentation
The following code:
$value : 12px;
.my-class {
margin: 0 auto -$value;
}results in the following CSS output:
.my-class {
margin: 0 auto-12px; }with no space between the auto and the -12px values. My browser (Firefox v42.0) doesn't recognize auto-12px as a valid value and ignores the rule.
Is this an issue where Sass's rules for compressing the output aren't taking the combination of auto (or any keyword string value) with a numeric value into account?
(The following is an example of the work-around I am using in these instances, but there should really be a space left between those values)
$value : 12px;
.my-class {
margin: 0 auto;
margin-bottom: -$value;
}[Sass 3.4.19 (Selective Steve)]
Source: sass/sass