rules.scsslint.UnnecessaryMantissa.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-web-frontend-scss Show documentation
Show all versions of sonar-web-frontend-scss Show documentation
Consume reports generated by scsslint for code quality. Also consume reports for code duplication (either simian or cpd). The information generated by reports are added in Sonar
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 - 2025 Weber Informatics LLC | Privacy Policy