org.sonar.l10n.css.rules.css.S4653.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-javascript-plugin Show documentation
Show all versions of sonar-javascript-plugin Show documentation
Code Analyzer for JavaScript/TypeScript/CSS
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;
}
See
- CSS Specification - Distance units