All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rules.scsslint.UnnecessaryMantissa.html Maven / Gradle / Ivy

Details

Numeric values should not contain unnecessary fractional portions.

Bad

margin: 1.0em;

Good

margin: 1em;

Sass will automatically convert integers to floats when necessary, making the use of a fractional component in a value to "force" it to be a floating point number unnecessary. For example, the following code:

$margin: 1;
p { margin: $margin / 2; }

...will compile to:

p { margin: 0.5; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy