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

org.sonar.css.checks.l10n.common.number-precision.html Maven / Gradle / Ivy

There is a newer version: 4.13
Show newest version

Numbers with lots of decimals may be a bit cryptic. Thus, for instance, using the calc function may be a good alternative to improve readability and understandability.

Noncompliant Code Example

With a maximum allowed precision of 3:
.mybox {
  bottom: 3.3333px; /* Noncompliant */
}

Compliant Solution

With a maximum allowed precision of 3:
.mybox {
  bottom: 3.333px;
}

OR

.mybox {
  bottom: calc(10px / 3);
}

stylelint Related Rules





© 2015 - 2024 Weber Informatics LLC | Privacy Policy