40 lines
723 B
Plaintext
40 lines
723 B
Plaintext
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
|
|
|
|
[source,css]
|
|
----
|
|
a {
|
|
width: 10pixels; /* Noncompliant; "pixels" is not a valid unit */
|
|
}
|
|
----
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
[source,css]
|
|
----
|
|
a {
|
|
width: 10px;
|
|
}
|
|
----
|
|
|
|
|
|
== See
|
|
|
|
* https://www.w3.org/TR/css3-values/#lengths[CSS Specification] - Distance units
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::message.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|