org.sonar.l10n.css.rules.css.S4653.html Maven / Gradle / Ivy
Why is this an issue?
The W3C specifications define the units
that can be used with lengths. A unit that is not part of the list of supported ones is likely
to be a typo and will be seen as a UI bug by the user.
This rule raises an issue each time a unit is not officially supported.
Noncompliant code example
a {
width: 10pixels; /* Noncompliant; "pixels" is not a valid unit */
}
Compliant solution
a {
width: 10px;
}
Resources
- CSS Specification - Distance units