#1912·sass

Increase strictness about whitespace around minus sign

Author: akaScooterCreated Nov 24, 2015Updated Apr 8, 2026
Labelsenhancementrequires deprecationblocked

Deprecation

Removal


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)]